Just noticed this in your code:
Code:
pci my_pci(frame, .ad(t_ad), cbe(t_cbe), irdy(t_irdy), reset(t_reset),clk);
How do you think that is going to connect those ports? Mixing named port mapping & positional port mapping is a bad idea. If you do that, verilog will happily synthesize it (but but, it compiles so it must be right, right? wrong!). But the synthesized result typically ends up with the signals wired up wrong.
Try something like this instead, where
you check if I got the names right.
All I did is add some period '.' characters to show you what I mean, and how to use named port mapping in this case:
Code:
pci my_pci(.frame(frame), .ad(t_ad), .cbe(t_cbe), .irdy(t_irdy), .reset(t_reset), .clk(clk));
Also, I see a whole bunch of signals on the "pci" module that you don't connect. You have of course made damn sure by design that it will not require those connections and then still synthesize/simulate as intended, right? Right? Because if you didn't, all bets are off.
Also, rtfm on $monitor. You are not providing a format string. If you do that you will get sortof the right result for just binary registers. And you get confusing results when using anything else. Precisely like you are doing one might add.
Do you know how to provide a format string for printf in C? It's the same idea here...
Some examples with $monitor and actual formatting:
http://www.asic-world.com/verilog/syntax3.html
**broken link removed**
I hope that helps.