er.twi.fb
Newbie level 3
Hi there,
Recently I was trying to write a Verilog Code for Multiplication by 3.
Condition-My Input is variable-Unsigned or Signed
My Multiplier is fixed-3
So if i have -20 as input in binary my output should by -60.
and 20 as input my output should be +60.
I want to declare only one output that is product and depending on clock pulse and input my output should be latched.
I wrote the code but it's not working. 3 is just 1 shift and 1 add.
Can anyone here suggest me the code so i can proceed in right direction??
Thanks a ton.
Recently I was trying to write a Verilog Code for Multiplication by 3.
Condition-My Input is variable-Unsigned or Signed
My Multiplier is fixed-3
So if i have -20 as input in binary my output should by -60.
and 20 as input my output should be +60.
I want to declare only one output that is product and depending on clock pulse and input my output should be latched.
I wrote the code but it's not working. 3 is just 1 shift and 1 add.
Can anyone here suggest me the code so i can proceed in right direction??
Thanks a ton.