buppu3 / tnCart

FPGA cartridge for MSX
BSD 3-Clause "New" or "Revised" License
28 stars 6 forks source link

fix build error introduced in previous commit #16

Closed herraa1 closed 1 month ago

herraa1 commented 1 month ago

Commit "Optimize the BLIT module of the V9990 emulator" causes the synthesis build error "ERROR (EX3652) : An enum variable may only be assigned to the same enum typed variable or one of its values" in file t9990_blit.sv in lines 1205, 1243, 1253 and 1287.

The build error happens with GOWIN FPGA Designer Version 1.9.9.03 Education Build(73833).

The proposed patch fixes the build error by explicitly defining a state_t enum type and making the localparams STATE_DST_WRITE_P1_ODD_VRAM_WAIT_BUSY, STATE_DST_WRITE_VRAM_WAIT_BUSY and STATE_DST_WRITE_CPU_WAIT_BUSY of type state_t.

The fix has been build tested with V9990 enabled.