--- Quote Start ---
'a' and 'b' are not clocks they are triggers. There is a separate clock that is used in separate state machines always blocks that run fine.
I was testing the code with signaltap and saw something that confused me.
Problem I was seeing is that address was incrementing on every clock cycle while ‘a’ was one ('b' was at zero) and not just when ‘a’ was transitioning from 0 to 1.
So with no posedges on either signal how could address be incrementing?
--- Quote End ---
Time to learn a bit about required Verilog syntax for hardware synthesis. The always block structure in post# 1 has a well defined meaning for a Verilog compiler, which has been already mentioned by kaz. I agree that the usage of "event posedge a" for an asynchronous control input in this construct is somehow counter-intuitive, and may cause confusion if read literally. But the syntax is used by all synthesis tools and specified in
ieee 1364.1 standard for verilog register transfer level synthesis.
Besides understanding the required Verilog syntax, there are issues involved with the semantic of your code.
- a FF can't be controlled by more than one edge sensitive input
- using edge sensitive "triggers" other than the clock (s) in a design is against synchronous design rules and is likely to cause timing problems. In terms of timing analysis, any edge sensitive event will be recognized as clock
In a strictly synchronous design, signal edges are detected by comparing previous and present state.