Created
December 1, 2018 22:23
-
-
Save swetland/303f48bba0437cac3380e0e6bc26bca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
localparam SEL_REG_B_IR_B = 1'b0; | |
localparam SEL_REG_B_IR_C = 1'b1; | |
// Does Not Work | |
logic [2:0]de_regs_bsel = (de_sel_reg_b == SEL_REG_B_IR_C) ? de_ir_sel_c : de_ir_sel_b; | |
// Does Work | |
wire [2:0]de_regs_bsel = (de_sel_reg_b == SEL_REG_B_IR_C) ? de_ir_sel_c : de_ir_sel_b; | |
// Does Not Work | |
reg [2:0]de_regs_bsel = (de_sel_reg_b == SEL_REG_B_IR_C) ? de_ir_sel_c : de_ir_sel_b; | |
// Does Work | |
logic [2:0]de_regs_bsel; | |
assign de_regs_bsel = (de_sel_reg_b == SEL_REG_B_IR_C) ? de_ir_sel_c : de_ir_sel_b; | |
// Does Work | |
logic [2:0]de_regs_bsel; | |
always_comb begin | |
case (de_sel_reg_b) | |
SEL_REG_B_IR_B: de_regs_bsel = de_ir_sel_b; | |
SEL_REG_B_IR_C: de_regs_bsel = de_ir_sel_c; | |
endcase | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment