fcfusion
Full Member level 4
Hi everyone
I have a silly question but I haven't found the solution anywhere else, so I hope you guys can help me.
How can some one implement a constant number without having to waste registers with it? For example, I want to add a variable "var" with a constant "c":
reg [15:0] var;
sum=var+c;
Is there a way to define the constant "c" through a "wire" with bits connected to VCC or GND, depending on the value. Usually I can do this on schematic when using Xilinx ISE but I dont know how to do it in Verilog.
Thanks
I have a silly question but I haven't found the solution anywhere else, so I hope you guys can help me.
How can some one implement a constant number without having to waste registers with it? For example, I want to add a variable "var" with a constant "c":
reg [15:0] var;
sum=var+c;
Is there a way to define the constant "c" through a "wire" with bits connected to VCC or GND, depending on the value. Usually I can do this on schematic when using Xilinx ISE but I dont know how to do it in Verilog.
Thanks