Hello,
Thanks for your input.. I cleaned up the code and it's working fine now. I made it a combinatory logic (without the clock). However I am facing an issue.
1) All the addresses pass through this comparator and are written into the memory
2) In the next clock cycle when I want to read from the address that I wrote to, the output isn't coming that clock cycle, but the next clock cycle.
Eg:# 10 --> write to address 01
# 20 --> Read from address 01 ( I should have got the output here) But I am gettin the output at# 30...
I am unable to understand this extra cycle delay because the comparator being a combinational circuit has its output ready in the same clock cycle it gets its input. I tried bypassing the comparator in which case I got the read output in the correct clock cycle. I am not able to find an answer as to why write is taking 2 clock cycles when a address comparator is connected :( . I have not addded any registers beetween the address comparator and the memory.
Any help is greatly appreciated...