J
jjlindula@hotmail.com
Guest
Hello, I'm hoping someone can help me with my problem. I'm still new
with Verilog/SystemVerilog so please forgive me for this question. I
have three inputs that I would like to put in an array and then use
the array to compare to some constant. I have some code below, please
let me know how I could do this better.
module dsp_if(
input dsp_ms0,
input dsp_ms1,
input dsp_msh,
input dsp_wr,
output dram_wren
);
localparam [2:0] MS0 = 3'b110;
localparam [2:0] MS1 = 3'b101;
localparam [2:0] MSH = 3'b011;
wire [2:0] strobes;
assign strobes[0] = dsp_ms0;
assign strobes[1] = dsp_ms1;
assign strobes[2] = dsp_msh;
assign dram_wren = (strobes[2:0] == MSO);
endmodule
Thanks,
joe
with Verilog/SystemVerilog so please forgive me for this question. I
have three inputs that I would like to put in an array and then use
the array to compare to some constant. I have some code below, please
let me know how I could do this better.
module dsp_if(
input dsp_ms0,
input dsp_ms1,
input dsp_msh,
input dsp_wr,
output dram_wren
);
localparam [2:0] MS0 = 3'b110;
localparam [2:0] MS1 = 3'b101;
localparam [2:0] MSH = 3'b011;
wire [2:0] strobes;
assign strobes[0] = dsp_ms0;
assign strobes[1] = dsp_ms1;
assign strobes[2] = dsp_msh;
assign dram_wren = (strobes[2:0] == MSO);
endmodule
Thanks,
joe