A
Andy Luotto
Guest
Hello, I am designing a digital block using signed arithmetic. I
wonder how Verilog / Verilog 2K / System Verilog and I am using the
signed
wire signed [REZ-1+DITHER+GUARD:0] un;
This works
assign un = wn - enm1*2 + enm1/128;
This DOES NOT work
assign un = wn - (enm1<<1) + (enm1>>7);
because it performs a LOGICAL shift. How do I implement arithmetich
shifts in verilog? I was thinking that this is done automatically as
long as the shifts are applied to signed wires or regs
thanks for discussing this
wonder how Verilog / Verilog 2K / System Verilog and I am using the
signed
wire signed [REZ-1+DITHER+GUARD:0] un;
This works
assign un = wn - enm1*2 + enm1/128;
This DOES NOT work
assign un = wn - (enm1<<1) + (enm1>>7);
because it performs a LOGICAL shift. How do I implement arithmetich
shifts in verilog? I was thinking that this is done automatically as
long as the shifts are applied to signed wires or regs
thanks for discussing this