Hi,
I guess you missed to give a lot of informations.
The headline says "design a comparator".
At first I thought of an analog comparator, but soon recognized it rather should be a digital one.
A comparator usually has to inputs and one output.
You completely missed to define each input(bit width? signed?...) and the output (=, <, >, <=, >=)
What's exactly the problem? Why can't you desgn it on your own? What help exactly do you need?
Then "text" vs "diagram"
* FIFO: I don' see a FIFO at all
* "to read the data from 1 block (gen block)" : I don't see "data", "1 block", "gen block"...
In the picture below, you can see that when reading the expected_data from gen block it misses 2 final data
No. I see that rdata is the same as expected_data. If it's like expected... where is the problem?
Can anyone suggest a solution?
As description? As code - what language? As schematic/logic?
Usually the forum is not meant to provide ready to use solutions. The forum is meant to give assistance in teaching you .. or to correct mistakes in your work. But we don't see what you have done/tried so far.
So please give a detailed description of the problem, including code/schematic/flow chart/ drafts .. where we can see all the signals you are talking about .... and the overall function.
Also tell us where exactly you need help, what you understand so far and is not clear.
Klaus