用Verilog HDL描述一个逻辑信号a,其逻辑值随时钟信号clk上升沿到来依次变为1010011001101,并验证仿真结

2025-01-06 18:36:58
推荐回答(2个)
回答1:

做一个计数器,根据计数值,分别赋值!

回答2:

reg [12:0] signal_a;
always @(posedge clk or negedge rst) begin
if(!rst)
signal_a <= 13'h14ab;
else
signal_a <= {signal_a[11:0],signal_a[12]};
end

wire signal_req = signal_a[12];