Alwaysblock1

2023. 6. 10. 20:00FPGA/HDLBits

728x90

Problem Statement

Build an AND gate using both an assign statement and a combinational always block. (Since assign statements and combinational always blocks function identically, there is no way to enforce that you're using both methods. But you're here for practice, right?...)

// synthesis verilog_input_version verilog_2001
module top_module(
    input a, 
    input b,
    output wire out_assign,
    output reg out_alwaysblock
);
	assign out_assign = a & b;
    
    always @ (*) 
        out_alwaysblock = a & b;
    
endmodule

'FPGA > HDLBits' 카테고리의 다른 글

Always if  (0) 2023.06.10
Alwaysblock2  (0) 2023.06.10
Module addsub  (0) 2023.06.10
Module cseladd  (0) 2023.06.10
Module fadd  (0) 2023.06.10