I'm reasonably new to ModelSim and Quartus and for the university I need to make an HDMI controller over an I²C interface. I am rewriting some given code into my own version of an HDMI I²C interface. In the given code, I'm given the following always block.
When running the design in ModelSim, using that case statement in the always block causes ModelSim to crash. I can see something about an out of memory error before it closes (can't find error logs anywhere).
The given code does work when tested on a real board. And in my version, synthesizes and compiles fine. (I can't test the given project in ModelSim as it gets other errors.)
I can provide more segments of code as needed, however it is the segment alone that causes the crash. (I tried with the other blocks there or commented out. Still crashes.)
reg [15:0] LUT_DATA;
reg [6:0] LUT_INDEX;
parameter LUT_SIZE = 31;
...
always
begin
case(LUT_INDEX)
// Video Config Data
0 : LUT_DATA <= 16'h9803; //Must be set to 0x03 for proper operation
1 : LUT_DATA <= 16'h0100; //Set 'N' value at 6144
2 : LUT_DATA <= 16'h0218; //Set 'N' value at 6144
3 : LUT_DATA <= 16'h0300; //Set 'N' value at 6144
4 : LUT_DATA <= 16'h1470; // Set Ch count in the channel status to 8.
5 : LUT_DATA <= 16'h1520; //Input 444 (RGB or YCrCb) with Separate Syncs, 48kHz fs
6 : LUT_DATA <= 16'h1630; //Output format 444, 24-bit input
7 : LUT_DATA <= 16'h1846; //Disable CSC
8 : LUT_DATA <= 16'h4080; //General control packet enable
9 : LUT_DATA <= 16'h4110; //Power down control
10 : LUT_DATA <= 16'h49A8; //Set dither mode - 12-to-10 bit
11 : LUT_DATA <= 16'h5510; //Set RGB in AVI infoframe
12 : LUT_DATA <= 16'h5608; //Set active format aspect
13 : LUT_DATA <= 16'h96F6; //Set interrup
14 : LUT_DATA <= 16'h7307; //Info frame Ch count to 8
15 : LUT_DATA <= 16'h761f; //Set speaker allocation for 8 channels
16 : LUT_DATA <= 16'h9803; //Must be set to 0x03 for proper operation
17 : LUT_DATA <= 16'h9902; //Must be set to Default Value
18 : LUT_DATA <= 16'h9ae0; //Must be set to 0b1110000
19 : LUT_DATA <= 16'h9c30; //PLL filter R1 value
20 : LUT_DATA <= 16'h9d61; //Set clock divide
21 : LUT_DATA <= 16'ha2a4; //Must be set to 0xA4 for proper operation
22 : LUT_DATA <= 16'ha3a4; //Must be set to 0xA4 for proper operation
23 : LUT_DATA <= 16'ha504; //Must be set to Default Value
24 : LUT_DATA <= 16'hab40; //Must be set to Default Value
25 : LUT_DATA <= 16'haf16; //Select HDMI mode
26 : LUT_DATA <= 16'hba60; //No clock delay
27 : LUT_DATA <= 16'hd1ff; //Must be set to Default Value
28 : LUT_DATA <= 16'hde10; //Must be set to Default for proper operation
29 : LUT_DATA <= 16'he460; //Must be set to Default Value
30 : LUT_DATA <= 16'hfa7d; //Nbr of times to look for good phase
default: LUT_DATA <= 16'h9803;
endcase
alwaysalways what? Try e.g. always @ ( * ) - Oldfart