Verilog HDL Program for the function f=x>>3 + x<<4

Verilog HDL Program for the function f=x>>3 + x<<4.

1
2
3
4
5
6
7
8
9
10
11
12
module sftsum(f,x);
    output [3:0]f;
    input [3:0]x;
    reg [3:0]f;
    reg [3:0]a,b;
    always @ (x)
    begin
        a=x>>3;
        b=x<<4;
        f=a+b;
    end
endmodule
Simulated waveform for the function f=x>>3 + x<<4
Simulated waveform for the function f=x>>3 + x<<4
Ansten Lobo

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in