Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHC-SR04 (ultrasonic sensor) verilog code help
Hi, for my project i have to interface the HC-SR04 (ultrasonic sensor) to my DE2-115 board. I have been struggling with the verilog code for a while. Can anyone please help me out with the code? T...
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- A devision by two is the same as shifting to the LSB side. --- Quote End --- Thank you. So, I will have to Left shift it by 1 (Ex: A/2 is the same as A<<1). Example, 4'd12, in binary its 4'b1100; if we right shift it once we get 4'b0110 which is 6 in decimal. I think that is correct. Can you please correct me if i'm wrong. Multiplication operator is synthesizable right?