Altera_Forum
Honored Contributor
15 years agoHow to add 'enable' to combinational logic
I need a module to calculate the following:
d=((a xor b) xor c) Each variable is 32 bits in size. Also along with this I need signals like valid_in, valid_out and enable(en) for the module. Will the following constructs be useful for this module: wire [31:0] out1, out2; xor u1(out1,a,b); xor u2(out2,out1,c); assign d=out2; always @(out2) valid_out=1; I can't figure out how to include the enable signal in the module. Can anyone suggest how to do that?