sy2002 / MiSTer2MEGA65

Framework to simplify porting MiSTer (and other) cores to the MEGA65
GNU General Public License v3.0
34 stars 8 forks source link

Case expression and choice expression width mismatch #33

Closed sy2002 closed 7 months ago

sy2002 commented 8 months ago

Randomly found this while waiting for synth to complete and browsing log files.

Not sure if relevant, feel free to "Close as not planned" if not relevant:

[Synth 8-6044] Case expression and choice expression width mismatch, Case expression is 9 wide and choice expression is 8 wide ["M2M/vhdl/controllers/HDMI/video_out_clock.vhd":136]

It is about this 9-bit long case statement and these 8-bit long when statements:

        case '0' & addr is
          -- Desired frequency = 25.200 MHz
          -- CLKFBOUT_MULT_F   = 31.500
          -- DIVCLK_DIVIDE     = 5
          -- CLKOUT0_DIVIDE_F  = 5.000
          -- CLKOUT1_DIVIDE    = 25
          -- Actual frequency  = 25.200 MHz
          when x"00" => data := x"06" & x"1145" & x"1000";  -- CLKOUT5 Register 1
          when x"01" => data := x"07" & x"0000" & x"8000";  -- CLKOUT5 Register 2
          when x"02" => data := x"08" & x"1083" & x"1000";  -- CLKOUT0 Register 1
MJoergen commented 8 months ago

That is indeed a bug, although I think Vivado magically knows what I'm trying to do. Thanks for reporting it.