1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00

290 Commits

Author SHA1 Message Date
Andreas Olofsson
ddfeebd33f Cleaning up read response logic
- Bypass path was ugly! Always try to go through the same logic path as much as possible.
- Note: when MMU is enabled, you need to put in entry for read return (ie 810)
2015-11-29 19:07:28 -05:00
Andreas Olofsson
3ce9b41726 Working mailbox!
- Gating mailbox_not empty with irq_en. bit [28] of RXCFG
- Changing elink output interrupt to "or" of not_empty and full
- Adding mailbox status register (mostly for debug)
- Moving register addresses to make space for mailbox status register
- Fixing wrappers for DV
- Updating README docs with new register map
- Removing mailbox from RX status reg. Doesn't belong there, should be coupled with mailbox for modularity.
2015-11-29 12:20:17 -05:00
Andreas Olofsson
711088a9e7 Fixed mailbox bug on remap
- Bypassing remap on write to RX registers
- Otherwise the write to mailbox gets dropped since 810 gets remapped to 310
2015-11-29 12:10:53 -05:00
Andreas Olofsson
2ca649394b Adding timeout response code 2015-11-29 10:27:43 -05:00
Andreas Olofsson
ad568ad0a0 Implementing simple 64K cycle timeout for slave interface 2015-11-28 22:31:39 -05:00
Andreas Olofsson
c294ba7775 Fixing readback from mailbox 2015-11-28 21:41:18 -05:00
Andreas Olofsson
1890657d6d Solved read response bug. MATMUL WORKS!!!!
- Turns out I was debugging ghosts for ~1 day today. Everything was working in simulation but nothing works in the FPGA. Since I was only changing small logic stuff, I didn't bother checking the warning messages in Viviado. Turns out for some reason it was throwing away some logic and disconnecting all the important rr signals
- This is where I was making changes, but I still can't figure out what exactly was happening...doesn't make sense. Either there is a bug in icarus or in vivado, this shouldn't happen!
2015-11-25 23:50:29 -05:00
Andreas Olofsson
d66317abbc Fixing bug for readback??
- There was definitely a bug there, that has been fixed
- But now the interface seems completely broken...
- Passes in simulation and "should work"...
2015-11-25 21:57:25 -05:00
Andreas Olofsson
379099da9c Filtering register write transactions
-They were going out on the elink (not safe)
2015-11-25 21:56:56 -05:00
Andreas Olofsson
33d5fb72e1 Filtering out short wait-low pulses from legacy elink
-Feels safer, should not be any short wait glitches
2015-11-25 21:55:37 -05:00
Andreas Olofsson
40c0c95791 Fixing clock transfer speedpath
- Better to do shift register than a wide or pulse
2015-11-25 21:54:02 -05:00
Andreas Olofsson
e5163d4d82 Adding debug logic to elink
- packet capture register
- transaction counter logic
2015-11-25 21:53:33 -05:00
Andreas Olofsson
eb0ad74973 Adding testing/motnirot logic to link
- RX/TX satus registers with sticky bits
- monitor register for checking number of valid transactions
2015-11-25 12:50:02 -05:00
Andreas Olofsson
91f8e3db5a Complete redesign of the TX
- After finding the bug in the reference model and wasting countless hours going back and forth with FPGA timing optimization and bug tweaks, I realized that the  design was fundementally broken. The decision to use two clock domains (high speed) and low speed was correct from the beginning. The FPGA is dreadfully slow, (you definitely don't want to do much logic at 300MHz...), but the handoff between tclk and tclk_div4 was too complicated. The puzzle of having to respond to wait quickly, covering the corner cases, and meeting timing was just too ugly.
- The "new" design goes back to the method of using the high speed logic only for doing a "dumb" parallel to serial converter and preparing all the necessary signals in the low speed domain.
- This feel A LOT cleaner and the it already passes basic tests with the chip reference and the loopback after less than 3 hours of redesign work!
- The TX meets timing but there is still some work to do with wait pushback testing.
2015-11-24 01:12:07 -05:00
Andreas Olofsson
f873efd163 Turns out we don't have the proper axi slave model to properly test the change in the axi master... 2015-11-18 23:59:55 -05:00
Andreas Olofsson
0e8a706bdf Putting 32bit size check back in to esaxi strobe logic
-Need to get into this again! (don't like this part of code still..)
-One lesson, if you are unsure of something leave the old code in comment...can save a lot of time.
2015-11-18 23:30:11 -05:00
Andreas Olofsson
673fba168d Fixed burst tail bug
- Clearing the "done" register with tx_burst. Kind of makes sense logically since while we are in burst mode we are not done.
- Still not 100% happy with this circuit, but there arent' a lot of lines of code left...
- But elink now passes 500 random burst transactions!!!
2015-11-17 16:51:19 -05:00
Andreas Olofsson
5698302e05 Random test failure bug fixes
- Adding transaction counter to speed up debugging
- Clearing access signal on wait ("bubble")
- Adding back special propagation when there is a wait after io_wait.
2015-11-17 15:39:43 -05:00
Andreas Olofsson
1cdc384863 Cleaning up logic for new burst mode "bit[2]" 2015-11-17 09:48:29 -05:00
Andreas Olofsson
d14cc0f258 Added missing burst bit for legacy elink...
- This is a pain in the ass and should never have been implemented in the first place!
- Burst information is contained in two places, once in the first byte being transmitted and once by the frame staying high
- This was done because there was a second special bursting mode where data is streamed into the same address, so bit[2] becomes a "command bit".
2015-11-17 09:46:22 -05:00
Andreas Olofsson
3102d6cd44 Adding comments 2015-11-16 09:58:47 -05:00
Andreas Olofsson
51c8ae600d Burst works (really this time!!!)
-Solved a speed path in synchronizing the wait signal, had to use the first edge signal fo the IO and the lclk_div4 for the core logic. It seems that the FPGA has a really hard time mixing clock domains, the routing delay between domains explodes
-Put in some special case logic for edge cases, like when there is a wait coming in from the IO and there is a wait from the IO. In that case, the packet gets sampled by the IO and not by the current logic.
-This needs to be cleaned up eventually, not clean enough but it's good enough for now.
2015-11-16 00:42:34 -05:00
Andreas Olofsson
5197822f53 Fixing burst logic speed path
- The burst signal was going fro lclk_div4 domain straight into the io high speed domain. There is quite a bit of logic on this signal. Instead of starting with false paths or multi cycle paths with firstedge, I changed the pipeline.
2015-11-15 12:26:54 -05:00
Andreas Olofsson
f77938e9b0 Simplifying TX logic!!!!
- The logic was a mess, causing me to go around in circles for days. In the end, by adding a missing sync circuit (duh!) between the fast and slow clock to align the edges and removing a redundant pipeline stage ("double") the nasty logic just fell away. Looks good now.
-Write bursts mostly works and design looks clean.
-one bug left to fix on streams of writes...
2015-11-15 01:35:46 -05:00
Andreas Olofsson
431abcda57 Removing write decode from wait pushback 2015-11-15 01:35:04 -05:00
Andreas Olofsson
df0deabd0f Re-re-fixing the wait on RX
- (fixing a temporary bad commit)
2015-11-15 01:34:20 -05:00
Andreas Olofsson
c1beed9a13 Two more wait bugs for burst
- The burst signal needs to be pipelined like everything else (0th order..)
- Don't look at write signal when pushing back wait...WILL GO BACK AND REVISIT THIS ONE LATER.
- Yeah, burst write test now passes!!!!
2015-11-13 17:26:05 -05:00
Andreas Olofsson
52b328c194 Redesign of elink transmitter
- Old design was not workable with bursting and long waits. The wait signal needs to be very carfully handled since it's asynchronous to the clock.
-The TX needs to be stopped quickly so the sync needs to be done at the high speed clock, not at div4 clock
-Since there are synchronizers here, there should be only one point of sync. This is not completely the case still, but I think??? it should be safe by constructiona at this point.
-bursting working at this point for writes!!!!!
2015-11-13 16:31:59 -05:00
Andreas Olofsson
78a72aa428 fixing packet format for remap block 2015-11-13 16:31:29 -05:00
Andreas Olofsson
a335194dea fixing packet reshuffling bug 2015-11-13 16:30:33 -05:00
Andreas Olofsson
f7806821c7 Various wait cleanups in RX
- using rx reset, safer as this stays in reset longer, until the clock has hade time to clean up the rest
2015-11-13 16:28:40 -05:00
Andreas Olofsson
a9e034bef9 Bringing access low during wait 2015-11-12 00:58:06 -05:00
Andreas Olofsson
1dcd9a82bd Fixing burst transmit bug
- The burst should be interrupted as soon as there is a wait signal. When the wait stops, a new frame naturally starts.
2015-11-11 22:33:54 -05:00
Andreas Olofsson
867b750c50 Adding write from stimulus to dv link1
- also, more cleanup of ID parameters
2015-11-11 14:02:02 -05:00
Andreas Olofsson
c885745f6c Fixing half/byte zero-out bug
- Interrupted mid coding apparently..
- Upper bits need to be zeroed out for 8/16 bit read responses
2015-11-11 14:00:13 -05:00
Andreas Olofsson
0a2ea66b7e Bug fix. Adding missing ID parameter.
- would only show up at different ID
- better to always make defauly nonsense
- sneaky...
2015-11-11 13:58:04 -05:00
Andreas Olofsson
7f0698bbc8 Fixed ctrlmode bug
- Found this by trying to toggle the LED in hardware!!
- So freaking close!!
2015-11-10 22:29:30 -05:00
Andreas Olofsson
5840c3e369 Fixing reset bug
- There is a register reset by out_clk reset on fifo_cdc
- This means the config path needs to us rx synched reset to be clean
2015-11-10 09:19:45 -05:00
Andreas Olofsson
f2b2c4fd00 Balancing TXclocks
- Better to be balanced with clocks (BUFG) than trying with BUFIO and having CDCs. Tools warned about it...
2015-11-10 09:19:01 -05:00
Andreas Olofsson
04cd179f5a Lint fixes for icarus/verilator 2015-11-09 21:57:25 -05:00
Andreas Olofsson
243ba6b608 Speedpath fix for rx io
- reduce fanout on IDDR block
2015-11-09 21:56:46 -05:00
Andreas Olofsson
efef6448c2 Fixing wait bug on config write (2 bugs)
- missing reset on wait signal
- missing wait on cfg
2015-11-09 21:55:46 -05:00
Andreas Olofsson
e2c917b6f9 Fixed packet reformatting bug 2015-11-09 20:38:55 -05:00
Andreas Olofsson
497dd71aaa Fixed readback bug
- there were hard coded magic number in code, bad practice!
- now works!
2015-11-09 20:38:12 -05:00
Andreas Olofsson
13d29f8e67 Stupid typos.. 2015-11-09 16:18:20 -05:00
Andreas Olofsson
61eb56c6f7 Final Vivado fixups:
- reduced frame fanout, removed clock gater in erx_io (improves speed path)
- driving constants on "wid signals" (proper)
- making lock signal 1 bit wide to remove warning
- moved backed to BUFIO for IDDR blocks
2015-11-09 16:09:12 -05:00
Andreas Olofsson
55ba8ff635 Cleaning up warnings from FGPA tools
- removing unconnected ports
- only one rst input for async_fifo
- synchronizing the reset input toe emaxi fifo
2015-11-09 13:23:40 -05:00
Andreas Olofsson
bf614a9873 Cleaning up fifo interface
- removing redundant signals
- configuring to put synchronizer inside fifo
- one reset only (not two)
2015-11-09 13:20:46 -05:00
Andreas Olofsson
01fd24e069 Fixing synchronization reset speed path
- This seems silly, why even have a syncrhonizer
- Safe to set speed path?
2015-11-09 00:16:35 -05:00
Andreas Olofsson
3797cac74f Solving critical paths for TX/RX
- Using the BUFIO makes another clock domain....FPGAs apparently hate clock domain crossings, avoid them at all cost.
- Now moving back to having on high speed clock domain for logic and DDR blocks, take care of IO alignment in software for TX and RX
- Also, fixed the io_wait path with logic...not sure what I was thinking there. Logic was trivial. The way it was,the io path was going straight into the FIFO as a wait.
2015-11-08 23:28:39 -05:00