verilog_vhdl7
Newbie level 5
- Joined
- Nov 15, 2014
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 103
Hi
This is a code written for baud generator. The problem is i get the following error
//cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of always construct //
First thing is what does this error means???
i have this multiple begin end blocks what does this impact in the following code.
I understand that begin end are sequential. can anyone explain the exact process flow???
Thank you
This is a code written for baud generator. The problem is i get the following error
//cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of always construct //
First thing is what does this error means???
i have this multiple begin end blocks what does this impact in the following code.
I understand that begin end are sequential. can anyone explain the exact process flow???
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 module baud_gen(baud_clk , clk,rst); parameter l = 77; parameter m = 78; parameter n = 156; parameter o = 155; input clk; input rst; wire clk; wire rst; output baud_clk; reg clk_out; reg [7:0] count; wire baud_clk; always @ (posedge clk or negedge rst) begin if(!rst) begin clk_out <= 1'bz; count <= 8'b0;; end else begin count <= count + 1; end if (count > 0 && count < m) begin clk_out <=1'b0; end else if (count >l && count < n) begin clk_out <=1'b1; end if (count > o) begin count <= 8'b0; end else begin count <= count; end end assign baud_clk = clk_out; endmodule
Last edited by a moderator: