mahesh_namboodiri
Newbie
I have a LUT in I need to assign values. They are in the range of 0 to 3.3. Following is the code:
Now according to what i need, the last 12 bits should be the values that I want to enter into the variable, which are 0.4125, 0.825 etc all upto 3.3. I am supposed to access this module from another top level module. How do I convert these values into Floating/Fixed point representation? I am at a loss. I cannot find any reliable converters on google.
Code:
case(address)
8'b00000000: new <= 16'bXX00111111111111;
8'b00000001: new <= 16'bXX00011111111111;
8'b00000010: new <= 16'bXX00000000010000;
8'b00000011: new <= 16'bXX00000000000000;
8'b00000100: new <= 16'bXX00111111111111;
8'b00000101: new <= 16'bXX00111111111111;
8'b00000110: new <= 16'bXX00000000010000;
8'b00000111: new <= 16'bXX00000000010000;
default: new <= 16'b0; // Default case if address is not matched
endcase
Now according to what i need, the last 12 bits should be the values that I want to enter into the variable, which are 0.4125, 0.825 etc all upto 3.3. I am supposed to access this module from another top level module. How do I convert these values into Floating/Fixed point representation? I am at a loss. I cannot find any reliable converters on google.