siva_7517
Full Member level 2
Hi,
I am currently doing multiplication with 2 different value of Q which is from ROM.
Below is an example of code of top module :
top (....)
..
..
assign tmpMult_1 = $signed(A) * $signed(Q); // Q=0.7071
assign tmpMult2_1 = tmpMult_1 - ($signed(B) * $signed(Q)); // Q= -0.7071
..
..
endmodule
I have a ROM verilog code:
module rom (read_en, address, Q);
input read_en;
input [2:0] address;
output [15:0] Q;
reg [15:0] Q;
always@(posdege read_en)
begin
case (address)
1'b0 : Q <= 16'b0101101010000010 // 0.7071
1'b1 : Q <= 16'b1010010101111110 // -0.7070
endcase
endmodule
How can instantiate this code to top module?
thanks in advance
I am currently doing multiplication with 2 different value of Q which is from ROM.
Below is an example of code of top module :
top (....)
..
..
assign tmpMult_1 = $signed(A) * $signed(Q); // Q=0.7071
assign tmpMult2_1 = tmpMult_1 - ($signed(B) * $signed(Q)); // Q= -0.7071
..
..
endmodule
I have a ROM verilog code:
module rom (read_en, address, Q);
input read_en;
input [2:0] address;
output [15:0] Q;
reg [15:0] Q;
always@(posdege read_en)
begin
case (address)
1'b0 : Q <= 16'b0101101010000010 // 0.7071
1'b1 : Q <= 16'b1010010101111110 // -0.7070
endcase
endmodule
How can instantiate this code to top module?
thanks in advance