20.1.2.2 Interrupts

20.1.2.2.1 F2H Interrupts

The MSS simulation model acknowledges assertion of the F2H interrupts. There are 64 F2H interrupt ports. When the MSS receives a valid active-high interrupt, it acknowledges them by printing a message as shown in the following code block.

# INFO : F2H_INTERRUPT[0] is asserted
# INFO : F2H_INTERRUPT[1] is asserted
# INFO : F2H_INTERRUPT[2] is asserted
# INFO : F2H_INTERRUPT[3] is asserted
# INFO : F2H_INTERRUPT[4] is asserted
# INFO : F2H_INTERRUPT[5] is asserted
# INFO : F2H_INTERRUPT[6] is asserted
# INFO : F2H_INTERRUPT[7] is asserted
# INFO : F2H_INTERRUPT[8] is asserted
# INFO : F2H_INTERRUPT[9] is asserted
# INFO : F2H_INTERRUPT[10] is asserted
The interrupt inputs should be high for one MSS clock; otherwise, the MSS model rejects the interrupt for being too low and prints a message as shown in the following code block.
# ERROR : F2H_INTERRUPT[0] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[1] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[2] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[3] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[4] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[5] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[6] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[7] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[8] must stay high for at least one MSS clock cycle
# ERROR : F2H_INTERRUPT[9] must stay high for at least one MSS clock cycle

20.1.2.2.2 H2F Interrupts

The MSS simulation model allows you to use text files to set and clear H2F interrupts. To do this, add the following command in the run.do file:
vsim -L polarfire -L presynth -t 1ps -g H2F_MEMFILE=(path)/*.txt presynth.tb
For example:
vsim -L polarfire -L presynth -t 1ps -g H2F_MEMFILE=E:/mss_sim/h2f_sim.txt presynth.tb
There are 16 H2F interrupts. The following table lists their allocation in MSS.
Table 20-4. Allocating MSS Interrupts
H2F LineGroup
0GPIO
1MMUART, SPI, CAN
2I2C
3MAC0
4MAC1
5WATCHDOGS
6Maintenance
7SCB
8PolarFire®C-Message
9DDRC
10PolarFireC-DEVRST
11RTC/USOC
12TIMER
13ENVM, QSPI
14USB
15MMC/SDIO
Use text file based entries to set and clear an interrupt, see the following example.
Wait Time        (Time to wait in number MSS PLL clock cycles, Hex)
Interrupt Value  (16-bit value, Hex)
Wait time        (Time to wait in number MSS PLL clock cycles, Hex)
Interrupt Value  (16-bit value, Hex)
...

Example:

100          (Wait for 100 (256 in DEC) MSS PLL clock cycles)
FFFF         (Set all 16 interrupts)
1000         (Wait for 1000 (4096 in DEC) MSS clock cycles)
0000         (Clear all 16 interrupts)
...

The H2F interrupts can be cleared by clearing an interrupt register bit in the corresponding peripheral. These AXI transactions can be generated by an Initiator in FPGA fabric.

Table 20-5. Clearing Interrupts
H2F LineGroupAXI Address and Data Bits to Clear an Interrupt
0GPIORegPolarFire SoC_mss_regmap:GPIO:INTR
Physical Address

0x2012 0080

0x2012 1080

0x2012 2080

0x2812 0080

0x2812 1080

0x2812 2080

DataBit-0: To clear an interrupt, write the bit with 1.
1MMUARTRegPolarFire SoC_mss_regmap:MMUART:IIM
Physical Address

0x2000 0028

0x2010 0028

0x2010 2028

0x2010 4028

0x2010 6028

0x2800 0028

0x2810 0028

0x2810 2028

0x2810 4028

0x2810 6028

DataReading the IIM register clears this interrupt.
RegPolarFire SoC_mss_regmap:MMUART:MM2
Physical Address

0x2000 0038

0x2010 0038

0x2010 2038

0x2010 4038

0x2010 6038

0x2800 0038

0x2810 0038

0x2810 2038

0x2810 4038

0x2810 6038

DataReading the MM2 clears the interrupt.
1MMUARTRegPolarFire SoC_mss_regmap:MMUART:RTO
Physical Address

0x2000 004C

0x2010 004C

0x2010 204C

0x2010 404C

0x2010 604C

0x2800 004C

0x2810 004C

0x2810 204C

0x2810 404C

0x2810 604C

DataWriting the RTO register clears this interrupt.
1SPIRegPolarFire SoC_mss_regmap:SPI:INT_CLEAR
Physical Address

0x2010 800C

0x2010 900C

0x2810 800C

0x2810 900C

DataBit-5: Write 1 to clear the interrupt.

Bit-4: Write 1 to clear the interrupt.

1CANNot supported.
2I2CNot supported.
3MAC0Not supported.
4MAC1Not supported.
5WATCHDOGSNot supported.
6MaintenanceNot supported.
7SCBNot supported.
8PolarFireC-MessageNot supported.
9DDRCNot supported.
10PolarFireC-DEVRSTNot supported.
11RTC/USOCNot supported.
12TIMERNot supported.
13ENVM,QSPINot supported.
14USBNot supported.
15MMC/SDIONot supported.