649 Commits
Author SHA1 Message Date
jens ec57dcbe66 This commit was manufactured by cvs2svn to create tag 'MIPS_R13'.
git-svn-id: http://moon:8086/svn/vhdl/tags/MIPS_R13@935 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 08:18:47 +00:00
jens faa81b57e9 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@933 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 08:18:45 +00:00
jens fec1234493 deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@932 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 08:17:27 +00:00
jens d56aec5d03 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@931 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 07:48:35 +00:00
jens 921b1e8876 - update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@930 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 07:36:30 +00:00
jens 127ed5b3f7 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@929 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 07:35:37 +00:00
jens 840fcb7de1 - added async FIFO-stuff for R13
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@928 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 07:05:18 +00:00
jens 4a1d1df404 - added dedicated cpu_clk
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@927 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 07:04:09 +00:00
jens 03c23a0271 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@926 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-24 06:56:28 +00:00
jens 6cb8c135e2 - added async FIFO stuff for R13
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@925 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-23 17:07:45 +00:00
jens cb503294da - removed async FIFO stuff for R12
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@924 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-23 17:07:09 +00:00
jens 2858222d97 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@923 cc03376c-175c-47c8-b038-4cd826a8556b
2011-07-23 17:01:10 +00:00
jens a2f631f4de - removed signal 'irq_out'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@922 cc03376c-175c-47c8-b038-4cd826a8556b
2011-06-25 15:28:08 +00:00
jens f265661633 - removed pushd and popd from control lines. Reduce by 2.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@921 cc03376c-175c-47c8-b038-4cd826a8556b
2011-06-25 15:09:09 +00:00
jens 5430521f4f - chipreg was not bound
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@920 cc03376c-175c-47c8-b038-4cd826a8556b
2011-06-25 06:47:21 +00:00
jens 97a19e0eb7 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@919 cc03376c-175c-47c8-b038-4cd826a8556b
2011-06-25 06:37:42 +00:00
jens 5a3e859d59 - made it run
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@918 cc03376c-175c-47c8-b038-4cd826a8556b
2011-06-25 06:37:26 +00:00
jens e28d864e40 - added bus input FIFO
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@917 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-17 08:33:50 +00:00
jens ec301f5710 - added procedures for register R/W
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@916 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-16 12:24:07 +00:00
jens 26a0a30fdc - fixed bus-timeout for nx=0 and ny /= 0
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@915 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-15 23:43:34 +00:00
jens 66514fbf7c cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@914 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-15 16:00:13 +00:00
jens dff1254bd9 fixed unaligned src blitter bug
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@913 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-15 15:05:35 +00:00
jens 5c37f43fcb Inital version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@912 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-14 17:18:43 +00:00
jens c7f8eea244 - added byte alignment support for blitter
- added constant color blitting
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@911 cc03376c-175c-47c8-b038-4cd826a8556b
2010-05-14 17:18:17 +00:00
jens 197e65fc28 - increased window for RX/TX-Data to 32 kByte. Offset is at 0x8000..0x8FFC
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@909 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 12:04:18 +00:00
jens 0af5d4e58c - reserved 32 byte window for RX/TX-Data at offset 0x20..0x3C
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@908 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 10:15:56 +00:00
jens b5feee8447 - mapped emac additionally to cached area at 0x10000000
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@907 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 10:15:00 +00:00
jens 80f75ce136 - added crc32 for emac
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@906 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 08:28:36 +00:00
jens 17e00a420a - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@904 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 07:43:01 +00:00
jens 3e81496d67 - different IFG for gigabit and 10/100mbps
- combines MII-FIFO read delay with IFG-Function
- removed IFG-counter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@903 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 07:41:57 +00:00
jens cd4b4bb99a - changed behaviour of 'crc32_vld'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@902 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-10 07:25:32 +00:00
jens d51a303d9c - added emac
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@901 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 10:40:27 +00:00
jens 64ebb3af9e - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@899 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 10:36:01 +00:00
jens 073acdd2ff - packet size reduced by 4 if fcs-check is enabled
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@898 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 10:15:15 +00:00
jens eba2e4e3b9 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@897 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 09:14:01 +00:00
jens 7f6678d85a - added pin fcs_gen_en to append fcs for packet generator
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@896 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 09:01:10 +00:00
jens e7f4a5642a - added FCS-check (CRC32)
- added FCS check enable
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@895 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 09:00:38 +00:00
jens 330b7e019e - added FCS generation enable
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@894 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 08:59:44 +00:00
jens 9991abfebf - added FCS generation enable for TX
- added FCS check enable for RX
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@893 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 08:59:06 +00:00
jens 5fbcc211b9 - added generic for initial value
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@892 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 08:46:55 +00:00
jens 17bcf20d9d - added pin fcs_gen_en to append fcs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@891 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-09 08:46:41 +00:00
jens 6936064c01 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@890 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 19:13:34 +00:00
jens a23e3325c9 Inital version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@889 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 19:13:08 +00:00
jens 964b08a53c - added MII-FIFO read delay. To avoid tx_en-gaps during FCS calculation
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@888 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 19:06:11 +00:00
jens 11a46a6ef8 - never ending SIPO story
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@887 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 19:04:50 +00:00
jens 43f11d43a9 - prpared for testing of 100mbps and 1000mbps
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@886 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 19:04:39 +00:00
jens 0737dc8c74 - added gigabit_en pin
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@885 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 19:03:50 +00:00
jens e40bb138ba - added FCS-calculation (CRC32)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@884 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 16:53:16 +00:00
jens c00c254636 - never ending PISO story
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@883 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 16:52:47 +00:00
jens 1abe64b3b4 Inital version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@882 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 15:44:55 +00:00
jens 76eb2dfe32 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@881 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 08:41:47 +00:00
jens 68d0a4cf50 - renamed
git-svn-id: http://moon:8086/svn/vhdl/trunk@880 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 08:33:24 +00:00
jens 3faea6675b - renamed
git-svn-id: http://moon:8086/svn/vhdl/trunk@879 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 08:33:23 +00:00
jens 37d4fe76dc - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@878 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 08:30:12 +00:00
jens 328cb7309e - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@877 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 08:30:11 +00:00
jens d7e039dc77 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@876 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-08 08:30:10 +00:00
jens 59da541fca - bugfix: interframe gap counter was not effective
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@875 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 21:24:42 +00:00
jens 1f1d858f18 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@873 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 18:44:42 +00:00
jens 3a58fbb7af - simplified xfer-fsm, preamble, sipo32, etc
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@872 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 17:55:26 +00:00
jens 4b88e122f2 - fixed bug: capturing without din_en
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@871 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 17:54:26 +00:00
jens 615b776ead - added MII loopback
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@870 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 15:29:20 +00:00
jens edc389931a - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@869 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 15:28:49 +00:00
jens cfa1a3f8a2 - separate RX/TX status and size register
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@868 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 15:28:23 +00:00
jens 433ff23c41 - removed rx_er-flag
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@867 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 15:27:43 +00:00
jens 6cdd8d566b - tied mii_tx_er to 0
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@866 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 15:27:18 +00:00
jens 063019e23e - added byte_count reset
- generate ram_limit in sysclk-domain. Synced to MII-Clk domain
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@865 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 15:26:45 +00:00
jens 668ab68b8b - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@864 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 11:20:44 +00:00
jens bb41db0f76 - removed 'tx_err' from register flags
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@863 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 11:20:19 +00:00
jens c3b554ffc3 - packet generator now uses emac_tx as transmitter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@862 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-07 09:56:49 +00:00
jens b3cda75c60 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@861 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-06 18:30:46 +00:00
jens d1e30cfa5c - added gigabit--mode
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@860 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-06 18:30:31 +00:00
jens d7b6040c38 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@859 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-06 15:35:30 +00:00
jens 39c15ef86c - simplified: removed MII-FIFO. Connected RAM to MII-domain
- cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@858 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-06 15:35:21 +00:00
jens 8f283ae097 - simplified: removed MII-FIFO. Connected RAM to MII-domain
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@857 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-06 13:29:27 +00:00
jens bd64cab371 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@855 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-04 09:56:37 +00:00
jens c6e0de57ec - minor fix
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@854 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-04 09:55:51 +00:00
jens e8deef86a6 - added preamble genration
- simplified design
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@853 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-04 09:55:22 +00:00
jens 4d41635f19 - added MAC own address register
- added MAC check and promiscious mode
- added new flags
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@852 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-04 09:54:27 +00:00
jens d7a1ee94e6 - added preamble sync and preamble stripping
- added MAC own address register
- added MAC check and promiscious mode
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@851 cc03376c-175c-47c8-b038-4cd826a8556b
2010-04-04 09:53:55 +00:00
jens bd90e641cf - added ethernet MAC
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@850 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-30 10:22:46 +00:00
jens 25b57a30fe - slightly detuned MII_CLK for more realism
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@848 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-30 10:15:24 +00:00
jens ed9601c6aa - synced ifg_rdy to sys_clk
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@847 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-30 10:02:39 +00:00
jens d7c023950b - added ethernet MAC
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@846 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-29 10:11:02 +00:00
jens a6ba2eeec5 - added ethernet MAC
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@845 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 23:29:27 +00:00
jens 904ec64a52 - assigned INT_O
- register interface still under construction
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@844 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 23:27:06 +00:00
jens 4f1f4ca77b - more realistic timing of J-Bus Master
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@843 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 22:32:27 +00:00
jens 67136eeedf - improved allocation stuff
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@842 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 21:48:45 +00:00
jens 3d90300b81 - added pkt_armed register bit (ready-to-write-bit)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@841 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 20:00:36 +00:00
jens f6b662274c - reassigned register bits
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@840 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 19:59:36 +00:00
jens b2230a8afb - minor fix
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@839 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 17:05:54 +00:00
jens 2ca53be113 - added reset register bit for RX/TX
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@838 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 17:05:39 +00:00
jens 89b2cdc6f9 - improved IFG counter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@837 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 17:05:09 +00:00
jens 43085119b7 - added reset gen
- improved IFG counter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@836 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 17:05:00 +00:00
jens 19d5dc19d6 - added xfer_info FIFO with byte and word counter information
- added reset generator
- cleaned up
- reception is now working properly
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@835 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 17:04:28 +00:00
jens 6118008f77 - added packet generator
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@834 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 08:29:04 +00:00
jens aede06ea9e Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@833 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 08:28:48 +00:00
jens 6746955337 - added transfer dropstate in case of RAM full
- registered ctrl_out.pkt_lost. Cleared on pkt_free
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@832 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 08:28:29 +00:00
jens 34de6ae03e - fixed retrigger issue
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@831 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-28 08:27:21 +00:00
jens 2989bb688f - renamed signal names
- receiver commands:
  packet request : sets fill pointer to next packet from queue
  packet free       : removes packet from queue
- added pkt_done flag (TX idle)
- transmitter commands:
  packet alloc       : request ram for packet
  packet commit   : sends packet

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@830 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-26 09:45:44 +00:00
jens 38a95c85dd - renamed signal names
- added pkt_done flag (TX idle)
- transmitter commands:
  packet alloc       : request ram for packet
  packet commit   : sends packet

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@829 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-26 09:44:59 +00:00
jens 03cbf45996 - renamed signal names
- receiver commands:
  packet request : sets fill pointer to next packet from queue
  packet free       : removes packet from queue
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@828 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-26 09:43:23 +00:00
jens 7fd7987056 - added ram overflow bit
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@827 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 22:37:15 +00:00
jens 08e85b7e8f - modified input rdy logic to avoid multi cycle ready after idle
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@826 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 21:34:10 +00:00
jens 7c6a19b078 - added data read counter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@825 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 21:11:37 +00:00
jens f602a4baa7 - minor changes in register interface
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@824 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 21:11:10 +00:00
jens c0291407fe - removed data_vld from tx_ctrl_in and rx_ctrl_out
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@823 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 21:10:36 +00:00
jens ebdb4e1e2c - added din_vld which corressponds to din
- fixed wrong byte enables for first PISO (MSB_FIRST
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@822 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 21:09:59 +00:00
jens 0554714b52 - added dout_vld which corressponds to dout
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@821 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 21:08:50 +00:00
jens e8b6c8efdb - TX-params are set via ctrl_in directly from regsiter interface.
No parameter set via din anymore
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@820 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 19:56:53 +00:00
jens 832c1c8a33 - minor changes in register interface
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@819 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 09:34:27 +00:00
jens 3b014c19ca - modifications for improved SIPOs and PISOs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@818 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 09:34:01 +00:00
jens 80f57311e4 - redesigned :
- added data input register
  - PISOs can be cascaded


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@817 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 09:33:02 +00:00
jens 2978ddd09a - bugfix: LSB_FIRST was not working
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@816 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-25 09:31:43 +00:00
jens 869a0bd0ef - redesigned :
- din_en means stream is active
  - din_vld means shift enable
  - there also exist output versions dout_en and  dout_vld. Thus, SIPOs can be cascaded


git-svn-id: http://moon:8086/svn/vhdl/trunk@815 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-24 11:13:46 +00:00
jens d99d8e2b44 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@814 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-23 11:41:32 +00:00
jens 4057a7ba43 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@813 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-23 11:39:43 +00:00
jens 737df176f1 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@812 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-23 11:34:56 +00:00
jens cd285df8e8 - added command fifo for xfer unit
- completed first version of receiver
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@811 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-23 11:34:28 +00:00
jens c3c2cdfe2b - added MIN/MAX functions for integers
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@810 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-22 07:25:40 +00:00
jens 84fa08326f Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@809 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-21 21:23:50 +00:00
jens 433676de7d Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@808 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-21 15:17:09 +00:00
jens 8960bc52e7 - allow reallocation during tx-fill
tx is re-armed and already written data is discarded.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@807 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-21 15:12:09 +00:00
jens 88bd1e16d9 - added TX_RAM_SIZE generic
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@806 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-21 14:49:51 +00:00
jens 10a5d17015 - added transmitter part with memory allocation
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@805 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-21 14:41:09 +00:00
jens 5f29361ee4 - added vld_pipe flush during reset
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@804 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-21 11:35:33 +00:00
jens a799fffaa7 - renamed dout_en to dout_vld
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@803 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-19 10:22:16 +00:00
jens 1e2700f265 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@802 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-19 10:15:55 +00:00
jens 421c961df5 - added byte enables
- improvements for better generality
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@801 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-19 10:15:42 +00:00
jens 6ce6b1e4bc Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@800 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-18 22:01:10 +00:00
jens 6409d43d38 - added integer shift amount (sa)
with positive value for left shift and negaitve values for right shift
- removed shift_left port
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@799 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-18 20:18:25 +00:00
jens e84c9c287e Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@798 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-18 19:50:28 +00:00
jens d9f3628dd7 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@797 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-16 21:00:56 +00:00
jens afcfc8c13a Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@796 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-16 21:00:16 +00:00
jens 2369919996 - added f_sysclk generic
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@795 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-16 20:59:36 +00:00
jens 47e15b9feb Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@794 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-14 18:51:18 +00:00
jens 1a4f894996 - increased revision to R13
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@793 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 16:49:12 +00:00
jens fcce3dcf32 - made GPIO 0 bidirectional (added GPIO_DIR register)
- removed GPIO 1
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@792 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 16:46:21 +00:00
jens db662f411f Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@791 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 14:43:48 +00:00
jens 191af92d47 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@790 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 14:13:53 +00:00
jens ab41a4f80f Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@789 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 14:05:15 +00:00
jens 9ac3c738db Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@788 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 13:54:27 +00:00
jens 8750901468 - improved register update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@787 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 13:52:03 +00:00
jens ed483b2e03 - added syscall read
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@786 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 13:51:42 +00:00
jens 8971cdc872 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@785 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 13:51:12 +00:00
jens 0a601d2dd2 - made time specs in nano seconds, thus independent of clock
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@784 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 11:06:43 +00:00
jens ce9ff6339d Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@783 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 11:03:12 +00:00
jens e27c0f791a update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@782 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 10:50:30 +00:00
jens 874df39347 - increased MIPS area
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@781 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 10:50:08 +00:00
jens d5922c8f0d Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@780 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 10:49:06 +00:00
jens 4ab67a5eab update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@779 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 09:21:50 +00:00
jens b6219e970b update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@778 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 09:20:15 +00:00
jens 8dafff2722 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@777 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 09:19:52 +00:00
jens f60ac9a09d update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@776 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 09:01:43 +00:00
jens 90a8a33bb8 - Back to current work
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@775 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 08:37:10 +00:00
jens d820072d82 - Roll back for Release 12
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@774 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 08:30:35 +00:00
jens a73cc52a72 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@773 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 07:41:31 +00:00
jens d30f067cee - added Altera stuff
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@772 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 07:41:16 +00:00
jens 22024a75df update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@771 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 07:39:51 +00:00
jens 818ede23e1 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@770 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-12 07:35:21 +00:00
jens aad1f852b5 - improved instant_raw logic. Less false alarms
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@769 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 11:36:10 +00:00
jens 293699d051 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@768 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 11:35:25 +00:00
jens 28fc16da87 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@767 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 11:35:15 +00:00
jens 7c70fcb680 - added asynchronous BUS FIFOs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@766 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 11:33:44 +00:00
jens e6f39ee6b5 deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@765 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 11:31:51 +00:00
jens 4f388d5c10 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@764 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 11:28:22 +00:00
jens 0499e58f4b update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@763 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 09:21:29 +00:00
jens a7c1d8fec7 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@762 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 09:21:04 +00:00
jens 56b6044320 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@761 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 09:19:56 +00:00
jens 041aeb7974 deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@760 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-11 09:18:59 +00:00
jens 148c71d2b4 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@759 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-07 16:11:03 +00:00
jens 9bf3b46cf3 - added generic 'simulate_tx' for output of TX-Data into simulation log
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@758 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-07 16:10:57 +00:00
jens c6983bd768 - added MRDY_O for I/D-Cache
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@757 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-07 16:00:53 +00:00
jens e5f5e1d0e3 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@756 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-22 19:48:45 +00:00
jens 359869bc2d - added to_01() to timer counter, to avoid simulation warnings
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@755 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-17 10:54:19 +00:00
jens 943e7e9388 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@754 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-14 17:28:14 +00:00
jens daed8e12a0 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@753 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-14 15:44:22 +00:00
jens 60d59f2f07 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@752 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-13 10:51:47 +00:00
jens 28056fbdff - added new FIFO generics
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@751 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-12 10:36:50 +00:00
jens 3c3b5e76a7 - added new FIFO generics
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@750 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-12 09:52:36 +00:00
jens 651cd11ec0 - added new FIFO generics
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@749 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-11 21:56:32 +00:00
jens 5889dc2d4a - added new FIFO generics
- no STB_O if Bus input FIFO full.
  => Bus out FIFO is read if SRDY_I = '1'  and MRDY_O = '1'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@748 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-11 21:56:03 +00:00
jens 819028cd9b update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@747 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 12:10:10 +00:00
jens e162dd8798 - removed cpu_clock unrelated path
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@746 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 12:09:53 +00:00
jens 6136f02789 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@745 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 11:46:51 +00:00
jens 6b0327c702 - set sys_freq to 100MHz
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@744 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 11:46:41 +00:00
jens fb96e23852 - fixed rounding issue in usec prescaler
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@743 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 11:46:08 +00:00
jens d185bd4aa1 - bugfix
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@742 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 10:21:14 +00:00
jens d47fbfee09 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@741 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 10:20:48 +00:00
jens 6baab07e5a update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@740 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 10:19:56 +00:00
jens a3a85d2c98 - improved UTILS_FREQ_M(), UTILS_FREQ_D().
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@739 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 10:16:36 +00:00
jens 80dbbd7024 Minor changes to max cycle count
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@738 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 09:56:44 +00:00
jens b6dcc8cc48 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@737 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 09:38:56 +00:00
jens 810ae067bc Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@736 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 09:06:00 +00:00
jens c7fa54ce6b - to_cycles() now correctly rounded
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@735 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 08:42:21 +00:00
jens 0c50e933f8 - changed frequencies into MHz units (real data type)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@734 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 07:50:27 +00:00
jens 385aa5e008 - changed frequencies into MHz units (real data type)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@733 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-09 07:25:49 +00:00
jens f6be505eba - added f_syscll_hz generic
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@732 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-08 07:08:32 +00:00
jens 06c9683eea update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@731 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 20:46:27 +00:00
jens 823dd066c2 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@730 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:21:46 +00:00
jens a1aa8dd969 - added asynchronous BUS FIFOs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@729 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:18:10 +00:00
jens ddbf6da277 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@728 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:17:28 +00:00
jens 023b7e42a3 - added dedicated sys_clk_out frequency synthesis
- SDRAM clocks use sys_clk_out for clock generation
- added cpu_clk_out which is the same as sys_clk_in

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@727 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:16:11 +00:00
jens c42c0ba5b8 - added asynchronous BUS FIFOs
- added cpu_clk
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@726 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:12:19 +00:00
jens e0e8566bec - made time specs in nano seconds
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@725 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:11:55 +00:00
jens 7f8a82d9ba - added asynchronous BUS FIFOs
- added cpu_clk
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@724 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 19:01:33 +00:00
jens fd84fecaec - bugfix in to_cycles()
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@723 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 18:10:18 +00:00
jens f42e562e14 - made time specs in nano seconds
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@722 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 15:53:23 +00:00
jens 149140cad7 - made time specs in nano seconds, thus independent of clock
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@721 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 15:43:04 +00:00
jens 4cfe77786b - added read enable for DPRAM. Inhibits dout to be altered if FIFO is already empty on reads
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@720 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 13:58:14 +00:00
jens 5dae6793f2 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@719 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 13:56:25 +00:00
jens b8a69d571a - made time specs in SDRAM_config independent of SDRAM clock
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@718 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 12:54:24 +00:00
jens 010edebc97 - made time specs in SDRAM_config independent of SDRAM clock
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@717 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 12:41:09 +00:00
jens 13c772be6e update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@716 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-07 12:40:04 +00:00
jens f98a1c5fd3 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@715 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 21:21:11 +00:00
jens 4cd83ee40a Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@714 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 18:45:56 +00:00
jens f3c5702a67 - removed module reset_virtex4
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@713 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 18:45:30 +00:00
jens 4954924a4c update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@712 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 18:44:57 +00:00
jens 98e7a547af update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@711 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 14:14:43 +00:00
jens 56a734bb1a - removed module reset_virtex4
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@710 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 14:12:07 +00:00
jens 2e3f14ea17 - added 16-depth Bus input FIFO (2 cycles additional latency)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@709 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 14:07:47 +00:00
jens 0b403e7a58 Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@708 cc03376c-175c-47c8-b038-4cd826a8556b
2010-02-06 13:16:05 +00:00
jens c2c77faa8c Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@707 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 15:17:31 +00:00
jens c49d7464fd Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@706 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 15:12:12 +00:00
jens 24490316aa Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@705 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 15:11:18 +00:00
jens dfb24f6270 Renamed old to new
git-svn-id: http://moon:8086/svn/vhdl/trunk@704 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 13:15:13 +00:00
jens 2b488c8308 Renamed old to new
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@703 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 13:12:43 +00:00
jens e10b69e4fe Renamed old to new
git-svn-id: http://moon:8086/svn/vhdl/trunk@702 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 13:12:27 +00:00
jens a8e50fa8cc Renamed old to new
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@701 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 12:58:44 +00:00
jens 8e56002a55 Renamed old to new
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@700 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 12:58:43 +00:00
jens b9eda20be5 - added H/W blitter support
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@698 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 12:58:13 +00:00
jens a356c98ef3 - redefined regsiter addresses for VGA
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@697 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 12:57:37 +00:00
jens a352a5f9ad - added getpid(), kill(), link(), unlink()
- modifed read()
- added flush() for UART
- added screen_get_resx(), screen_get_resy(), screen_get_fps()
- added some more initializations in libsys_init()
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@696 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 12:57:01 +00:00
jens 2379f58695 - bugfix
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@695 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-31 12:54:03 +00:00
jens d3b5902e23 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@694 cc03376c-175c-47c8-b038-4cd826a8556b
2010-01-09 17:53:09 +00:00
jens 922ade83b7 - added states of pins clk and data to status register
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@693 cc03376c-175c-47c8-b038-4cd826a8556b
2009-12-06 15:22:01 +00:00
jens a1d88baad4 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@692 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-29 16:48:11 +00:00
jens 9a3aa287fd - register set extended for future extensions
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@691 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-29 16:47:56 +00:00
jens ebf615967c - bugfix: BLIT IRQ-ack had no effect
- increased BLIT chunk-size to 512 QWORDs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@690 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-28 20:32:28 +00:00
jens 7023fc8c69 - added 'page_mode_en' inputs for async_port
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@689 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-27 09:07:24 +00:00
jens 836e446d8b Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@688 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-27 08:30:51 +00:00
jens bc956a5d36 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@687 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-27 08:30:39 +00:00
jens 94d1cca7d4 - overwrite src-DIR with tmpl/tb_mips_top.vhd
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@686 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-27 08:30:33 +00:00
jens 250b732037 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@685 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-25 08:21:36 +00:00
jens f33f341adb update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@684 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-24 12:06:21 +00:00
jens 58316c2141 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@683 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-24 11:35:33 +00:00
jens 1f387fdd75 - Loads image for bugfix: instructions uncached LW => cached LW (with cache-miss) was buggy.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@682 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-24 11:35:08 +00:00
jens 21b41da6e2 - bugfix: instructions uncached LW => cached LW (with cache-miss) was buggy.
Symptoms:
  ...
1.: lw     $a0, 32($s0)  # Uncached load from memory mapped I/O
2.: lw     $a2, 4($v0)   # Cached load and cache-miss.
                                  # $a0 receives same value as $a2.
                                  # CPU skips writing $a0 due to busy flag of D-Cache,
                                  # which is already active in the previous cycle
...

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@681 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-24 11:33:37 +00:00
jens 3eef19bb28 - removed unused 'en' pin.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@680 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-24 11:30:36 +00:00
jens c0592b8ef4 - added full support for VGA-master 64-bit read/write to SDRAM
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@679 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 22:38:25 +00:00
jens c752d0a463 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@678 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 22:37:29 +00:00
jens cd8a49ad18 - added blitter loop
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@677 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 22:37:20 +00:00
jens fc1a9e7b3d - blitter FIFO is reseted on every new request
- blitter always avaliable regardless of MSTEN
- blit writes finish on blit_fifo_empty. Chunk counter only used for reads
- premature finish of blit reads if NX*NY satisfied. No more chunk granularity
- set BLIT_CHUNK_SIZE to 128 double-pixels

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@676 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 22:35:55 +00:00
jens f8c39b3cd4 - added blitter completion interrupt
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@675 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 16:25:00 +00:00
jens 01739e1519 - bugfix blitter reset
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@674 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 15:36:07 +00:00
jens 51f9d7849f - corrected blit NX which has to be divided by 2
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@673 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 15:10:50 +00:00
jens 4ff589039a - set 'f_pxl_clk' of 'ts_vga_testbench' tp 40MHz
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@672 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 13:52:27 +00:00
jens 80e3cad985 - added BLITTER
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@671 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 13:50:47 +00:00
jens 3157b3297b - added BLITTER tests
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@670 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-22 13:50:34 +00:00
jens 935645a97e - added Blitter registers
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@669 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-21 10:06:51 +00:00
jens 717239c086 - buf_chg_ack also on 'host_fb_back' write
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@668 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-19 20:35:56 +00:00
jens 514f9e0f58 - increased bous-FIFO depth to 2 bits, to avoid bus-stalls
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@667 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-19 20:03:49 +00:00
jens f7cbefef82 - added busout-FIFO for future multi-sourced master capability (VGA-scan, blitter)
Bus-out FIFO improved timing so much and leads to 300 less Slice - FIFOs are great!
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@666 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-19 10:37:58 +00:00
jens ffdc36ef4e - added sync FIFO for busout-FIFO
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@665 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-19 10:35:52 +00:00
jens 196633c670 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@664 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-18 08:11:22 +00:00
jens 8982313c71 - removed (quick and dirty) copy of front-Pointer to back-Pointer on buffer change. back-Pointer keeps host written value.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@663 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-15 22:19:36 +00:00
jens 76baac4f8c - relaxed VGA period to 8 ns.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@662 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-15 22:01:46 +00:00
jens a6129174e5 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@661 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-15 10:21:45 +00:00
jens 5d23284412 - added RDY generator => SLAVE is not always ready => better test.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@660 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-15 10:17:53 +00:00
jens 07a03b76f3 - removed 'sdr_data_req_r'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@659 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-15 10:10:28 +00:00
jens 974b6bfb14 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@658 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-11 10:29:31 +00:00
jens c30d40d42b update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@657 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-11 10:26:37 +00:00
jens 9ba64d156f update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@656 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-11 08:18:17 +00:00
jens 9b5fb2ad78 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@655 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-11 07:44:55 +00:00
jens 593390a93d - changed register defines to UPPER-CASE
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@654 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-09 20:36:16 +00:00
jens 576357a4d4 - removed btn-east for hard-reset
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@653 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-09 20:30:32 +00:00
jens 9253fd1df8 - minor changes to make ISE meet timing
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@652 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-09 20:29:54 +00:00
jens 9975fbd6cc - changes due to packing of resx, resy and fps into one 32-bit register
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@651 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-09 19:15:25 +00:00
jens 18c24e29f6 - renamed buffers to fb_front and fb_back
- fb_front is writable by host only if msten = '0'. fb_back is writable by host every time.
- fb_front and fb_back are changed after complete frame. Controller can issue buffer-change Interrupt
- packed resx, resy and fps into one 32-bit register
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@650 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-09 19:14:49 +00:00
jens 5fbb10f98d update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@649 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-09 19:13:48 +00:00
jens ec59074ba6 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@648 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 22:32:36 +00:00
jens 084ed1064a update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@647 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 22:30:30 +00:00
jens de99799f14 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@646 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 21:53:11 +00:00
jens fd0896f374 - added INT_O line for VGA
- mapped VGA-Int to IRQ5
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@645 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 21:51:06 +00:00
jens f0ad8cc351 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@644 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 21:50:11 +00:00
jens 444e7530e1 - bugfix: added 'bufchg_irq_en' to registers
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@643 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 21:50:03 +00:00
jens 618e8b54b0 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@642 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 20:23:22 +00:00
jens fcfe1d1d79 - added double buffer
- added INT_O on buffer change
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@641 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 20:23:11 +00:00
jens c465b190a0 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@640 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:07:55 +00:00
jens 9413b8d798 - changed register defines to UPPER-CASE
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@639 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:06:12 +00:00
jens 100634f883 - added
void Screen_clr(void);
  void Screen_line_clr(void);
  void Screen_csr_set_x(UINT32 coord);
  void Screen_csr_set_y(UINT32 coord);
- changed register defines to UPPER-CASE


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@638 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:05:26 +00:00
jens 24d11d565e - removed call to dbg_init()
- added call to libsys_init() which calls dbg_init().
- added
  void Screen_clr(void);
  void Screen_line_clr(void);
  void Screen_csr_set_x(UINT32 coord);
  void Screen_csr_set_y(UINT32 coord);
- changed register defines to UPPER-CASE


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@637 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:05:13 +00:00
jens 21fa0293d6 - removed call to dbg_init()
- added call to libsys_init() which calls dbg_init(). libsys_init()  is in libsys.c
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@636 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:03:06 +00:00
jens 56b6095f3b - more improvements on PS2 stuff
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@635 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:02:00 +00:00
jens e64f0709af - added DrawBox() test
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@634 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-08 13:01:25 +00:00
jens da76ef5d48 - turned all sys_clk-related async. resets to sys_clk synchronous resets
- scroll-disable when cursor y-pos was set

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@633 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-07 15:00:51 +00:00
jens 1cd391f0bc update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@632 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-07 12:01:22 +00:00
jens 570b03bca4 - added error flags
- RX abort when rx_buffer already full (error flag set)
- added parity error flag
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@631 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-07 12:01:11 +00:00
jens 19f258f351 - added error flags
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@630 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-07 11:59:48 +00:00
jens 04c4f04452 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@629 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 22:56:16 +00:00
jens a9b4edf095 - better - more sphisticated
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@628 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 21:33:14 +00:00
jens f5cfe810ef - added getchar()
- minor bugfixes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@627 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 21:22:12 +00:00
jens 4a5d55bd7e - uptodate will never be rebuilt
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@626 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 21:21:30 +00:00
jens 9adba48b45 - changes due to libsys changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@625 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 21:21:02 +00:00
jens e9ce7f666a - removed STDOUT and STDERR defines
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@624 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 20:49:39 +00:00
jens edcba93a3a - cleaned up
- introduced generic UART-lowlevel I/O with interface object
 (less functions, which do the same)
- added PS2-I/O and keycode translator (quick'n dirty)
- writechar(), readchar() and _putchar() have now a port parameter
- there are now 3 console interfaces available UART0, UART1 and PS2/VGA
- the small function GetPort() maps between filei ID and low-level port
- the small function GetPort() maps between

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@623 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 20:48:43 +00:00
jens 877ad05014 - due to changes in libsys.c, readchar() has now a port parameter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@622 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 20:43:56 +00:00
jens 012623b603 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@621 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 15:29:54 +00:00
jens 646e49e5b9 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@620 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 15:28:38 +00:00
jens 256301db76 - added PS2 interface 0/1
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@619 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 15:28:25 +00:00
jens df6d009bee - added PS2 interface 1
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@618 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 15:27:59 +00:00
jens 33f61f3007 - added PS2 interface 0
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@617 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-06 13:14:44 +00:00
jens f9d1fc4945 - better - more sphisticated
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@616 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 17:16:24 +00:00
jens 9158fc6655 - changed DSTDERR_FUNCTION=_cg_putchar
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@615 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 17:16:02 +00:00
jens d8517c136e - changed VGA register offset and bits
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@614 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 17:15:28 +00:00
jens c9ba66b646 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@613 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 17:13:42 +00:00
jens 84b52da6e1 - changed VGA resolution to ts_vga_800_600_60
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@612 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 17:13:05 +00:00
jens 35c1a5973d - changed VGA resolution to 1280x1024@72
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@611 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 13:43:28 +00:00
jens 0e3e910804 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@610 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 13:42:43 +00:00
jens dd24468d48 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@609 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 12:02:23 +00:00
jens 4a1eafc312 - added global clock generator
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@608 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 12:02:10 +00:00
jens 85779bda74 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@607 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 12:01:48 +00:00
jens 9485906877 - removed clkgen. VGA-clock generated in TB
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@606 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-05 11:55:53 +00:00
jens 85ca2bc0dd update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@605 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 19:33:11 +00:00
jens 2ab1b93e51 - changed register rudimentary register layout (new offsets!)
- added new regsiter features: status/ctrl register cursor position, screen resolution


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@604 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 19:31:47 +00:00
jens 381e7cc659 - added cursor position status port
- 'dout' is set to last written character
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@603 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 19:29:50 +00:00
jens 7a4dff1301 - more documentation
- more tests
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@602 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 19:28:52 +00:00
jens 6e1e0e1cd2 - minor bugfix (inclusion of distributed DPRAM, which doesn't exist)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@601 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 19:28:11 +00:00
jens c33943f991 - minor bugfix (width mismatch)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@600 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 19:26:53 +00:00
jens 3065e22f8f Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@599 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 10:51:36 +00:00
jens 57efb02eb6 - removed BUFG for clk_out. It's now in clkgen
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@598 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 10:39:59 +00:00
jens 05a24f5fda - added BUFG for clk_out
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@597 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 10:39:14 +00:00
jens 61919ba257 - Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@596 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 00:20:00 +00:00
jens 86e6050f60 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@595 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-04 00:17:35 +00:00
jens bf4d61bb10 - Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@594 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 23:50:00 +00:00
jens 1843d4de60 - added separate SD-CLK generator
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@593 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 23:25:29 +00:00
jens a3904fef4c - FIFO-depth of CMD-FIFO is not hardwired anymore. It's set to top-level FIFO-depth
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@592 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 23:25:06 +00:00
jens 643a506496 - changed TIMESPEC for VGA
- added TIMESPEC  for SDRAM
- SDRAM_CLK is now unrelated to SYS_CLK
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@591 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 22:52:50 +00:00
jens bfed7a6680 - changed CMD_FIFO_ADDR_WIDTH = 5
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@590 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 22:51:19 +00:00
jens 054d232b6c - added clkgen for vga
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@589 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 22:50:04 +00:00
jens b4be8c7433 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@588 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 22:13:10 +00:00
jens 06fccfd7af - added clkgen for vga
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@587 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 22:10:12 +00:00
jens c418244065 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@586 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:54:00 +00:00
jens fb119f08dd - include async. FIFO
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@585 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:53:32 +00:00
jens 738004f6ec - added clkgen for vga
- initialized master-mode
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@584 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:52:15 +00:00
jens 7cdf99b1f5 - pulled out clkgen. vga_clk is now provided from higher level
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@583 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:51:17 +00:00
jens 0c716c1cde - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@582 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:50:51 +00:00
jens b15b435913 - include utils_pkg
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@581 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:50:28 +00:00
jens e0f0157686 - put general helper functions to utils_pkg
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@580 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:49:07 +00:00
jens 2894ed417a update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@579 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:47:16 +00:00
jens d908ae0e9e - SDRAM can now operate at different speed than BUS clock
- separated bus-clock (sys_clk) and SDRAM-clocks
  - added async. FIFOs for clock domain separation
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@578 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:42:27 +00:00
jens 88d3bd6607 - cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@577 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:38:55 +00:00
jens ee04924d42 - added helper functions for DCM frequency synthesis
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@576 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 20:38:30 +00:00
jens 6f27bf0c89 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@575 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 12:59:40 +00:00
jens 76ef050e55 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@574 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 12:13:44 +00:00
jens eaa359df6b Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@573 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-03 09:59:34 +00:00
jens 04e357869f - bugfix: set Pos X/Y : data was not set.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@572 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-02 19:00:37 +00:00
jens 915d700d67 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@571 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-02 10:29:39 +00:00
jens 77d214b705 - always specified leadout and release states, regardless of CPU-strobe (better timing)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@570 cc03376c-175c-47c8-b038-4cd826a8556b
2009-11-02 10:29:23 +00:00
jens 0bd204d435 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@569 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 13:55:15 +00:00
jens 2db39f4504 - zero lead-in / lead-out,
but added 4 cycles relelease necessary for writes. See tWR in datasheet)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@568 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 13:55:06 +00:00
jens d37afef047 - some performance improvements
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@567 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 13:51:00 +00:00
jens a38101e448 - Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@566 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 12:27:36 +00:00
jens e85aded32a update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@565 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 12:27:18 +00:00
jens d5254aa0d7 - writes have at least lead-in of one cycle if lead-in is speifified to 0
- no data drive during lead-out
- no instant data drive in idle on 'en'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@564 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 12:26:42 +00:00
jens 989fe72ddb - read-page cycle is minimum 2 cycles
- change assertion check: Read page pulse length must be greater than one

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@563 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-30 10:49:15 +00:00
jens 9ad3c6cd4e - now 30 ns
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@562 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-29 22:57:11 +00:00
jens 41067b50fc - Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@561 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-29 22:56:20 +00:00
jens a6490e8007 - minor changes to flash_addr
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@560 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-29 20:54:48 +00:00
jens ba2264ed97 - changed ROM names to make TB run again
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@558 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 23:25:02 +00:00
jens 3072e46951 - removed PrintCPUInfo()
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@557 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 23:18:16 +00:00
jens 19fe5c9005 - removed ROM-depth generic
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@556 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 23:13:33 +00:00
jens d9f9c66962 - removed XMEM-wait
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@555 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 23:12:36 +00:00
jens ec8a4254a9 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@554 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 23:11:11 +00:00
jens 8ee78f468d - added IOB_DELAY=NONE to 'sys_flash_d'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@553 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 23:08:10 +00:00
jens 00234a1efd update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@552 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 22:54:04 +00:00
jens a3d54edf64 - added 'page_mode_en' for async_port
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@551 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 22:45:36 +00:00
jens 9ea208eaf0 -added new page_read parameters
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@550 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 22:45:24 +00:00
jens 6ab6c0632c -added new page_read. Page read can be en/disabled
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@549 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 22:44:07 +00:00
jens 6da937fe58 - flash has access time of 25 ns
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@548 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-28 10:43:27 +00:00
jens 1d72b92b46 - Booting from Flash is now from cached area (faster)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@547 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 23:46:07 +00:00
jens 2d45364d7e - minor no functional changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@546 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 23:45:48 +00:00
jens b56a35171a - Booting from Flash is now from cached area (faster)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@545 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 23:35:49 +00:00
jens 194eacd637 - added sys_flash_mem
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@544 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 23:32:42 +00:00
jens 8aa77da2b1 - bugfix: wrong number of available flash blocks
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@543 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 23:32:10 +00:00
jens 034f28a4f6 - change names of block align functions
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@542 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 23:32:09 +00:00
jens 9cdec8e722 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@541 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:59:32 +00:00
jens efa1c33c13 Initial revison
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@540 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:58:11 +00:00
jens ecb22dfeee - operate UART2 and UART1 in parallel for monitoring
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@539 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:49:40 +00:00
jens 5ecfef0595 - changed names
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@538 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:48:53 +00:00
jens 0b8624c6ac update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@537 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:48:07 +00:00
jens 3709ffcefe - async_port_timing: Changed names and timing diagram
to reflect V1.6 of async_port_wb.vhdl

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@536 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:42:08 +00:00
jens 8b49c6197c - redesigned FSM. Zero leadin, zeroleadout and zero release is now possible
- added assertion check for zero r/w-pulses
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@535 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:25:36 +00:00
jens c8306cafc4 - changed names
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@534 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:22:03 +00:00
jens 4a5178da93 - added flash_we_n
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@533 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-27 21:21:50 +00:00
jens 5d7fed1259 - removed force-TX-IRQ and TX-IRQ acknowledge
- TX-IRQ is always asserted if tx-FIFO is empty and tx-inten is active.
  If TX-INT is not desired, it has to be switched off manually by TX-Inten.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@532 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-24 20:27:57 +00:00
jens 116defca80 - BIU: corrected drawing thickness of data lines
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@531 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-24 15:00:58 +00:00
jens ddeccf3a34 - added force TX-interrupt register bit (0x200)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@530 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-18 18:46:06 +00:00
jens 65404dbba8 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@529 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 21:47:27 +00:00
jens 6130b4c260 - Bugfix: argc and argv were not correctly set. New introduced bug because of minor change.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@528 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 21:46:19 +00:00
jens 08f122c910 Initial revison
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@527 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 17:41:54 +00:00
jens 97453f606e - added LWL/LWR bypass
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@526 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 17:40:46 +00:00
jens fe950520b4 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@525 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 17:35:37 +00:00
jens a07b596168 - added some comments
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@524 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 17:33:45 +00:00
jens d8083946f3 - changed NMI/RST behavior: reset exception entered after NMI/RST transition 1 => 0.
- BEV = 1 after NMI/RST (like hard reset)
- status not KUc,IEc not saved to KUp, IEp at NMI/RST (like hard reset)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@523 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 17:19:41 +00:00
jens 44b4412d53 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@522 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 14:14:33 +00:00
jens 55ef215f63 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@521 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 14:10:44 +00:00
jens 774fe348b5 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@520 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 13:15:51 +00:00
jens 584ac47a8a - Bugfix: register bypass with same target register, used for unaligned loads (LWL, LWR), was incorrect.
Newlib's memcpy() (MIPS-optimized) uses this for unaligned copy.
  Consectutive load instructions without nops using same target register (which is legal) like
   lw $1, 0(mem)
   lwl $1, 1(mem)
  or
   lwl $1, 0(mem)
   lwr $1, 1(mem)
  or similar, lead to incorrect result. Now it's fixed.


git-svn-id: http://moon:8086/svn/vhdl/trunk@519 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 12:58:28 +00:00
jens 8159135dfd update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@518 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-17 12:58:15 +00:00
jens 6ac97e7bf3 added second UART
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@517 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:06:19 +00:00
jens 51ea254c82 removed error defines (they are in libsys.h)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@516 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:05:50 +00:00
jens eafadbfa05 added target: serdump
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@515 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:05:12 +00:00
jens a6cf47015c - initialization fix in write()
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@514 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:04:46 +00:00
jens 730714620d - added 'sys_flash_mem'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@513 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:04:45 +00:00
jens 73dcae8d35 added more UART low-level functions
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@512 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:04:44 +00:00
jens abb030f663 added endian switch for convenient endian switching
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@511 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 22:02:57 +00:00
jens 749c8a6144 - added addtional UART (4 UARTS in total)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@510 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 21:33:41 +00:00
jens 9a1a5579bf Bugfix in gen_fill_mask_rom (wrong result on zero shift amounts due to width mismatch)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@509 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-14 21:15:31 +00:00
jens 47c0a1b682 - added tx-complete and tx-empty to ports
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@508 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-13 21:21:57 +00:00
jens 5b743dea38 - fixed broken tx-interrupt
- added tx_int and rx_int to status reg
- tx-int is acked by writing to ctrl reg
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@507 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-13 21:21:22 +00:00
jens 38b70b722c - extended baudrate register from 8 to 16 bits, allowing very low baudrates
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@506 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-09 09:37:43 +00:00
jens a6b19c1621 - added two addtional UARTs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@505 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-08 21:34:20 +00:00
jens 45d8f099ca - added two addtional UARTs. UART2 not operable (just loopback) due to synthesize problems - or a bug
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@504 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-08 21:34:00 +00:00
jens 15d9de633c - added two addtional UARTs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@503 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-08 21:32:34 +00:00
jens b288e8ee43 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@502 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-08 21:31:57 +00:00
jens 4b25be2021 - removed odd dist-versions of FIFOs and RAM
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@501 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 17:19:11 +00:00
jens 8549615cd0 update to R12
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@500 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 17:18:05 +00:00
jens 822059724f update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@499 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 17:17:26 +00:00
jens c104a7b916 - added pin non-maskable interrupt (NMI).
Exception vector is reset vector at (X"BFC00000")
- added pin 'eb' for endian little/big choice. 'eb' is sampled at reset
- UART(): merged TX and RX interrupt to one interrupt line

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@498 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 17:16:22 +00:00
jens 3a8641003e - added pin non-maskable interrupt (NMI).
Exception vector is reset vector at (X"BFC00000")


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@497 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 17:01:36 +00:00
jens 2424f52409 - added configurable endian flags
- added more programs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@496 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:50:16 +00:00
jens 237fc3d163 - changes, changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@495 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:49:32 +00:00
jens 21f33a1768 - added exception vector table.
S/W can write exception handler entry to this table.
  Exception handler can now reside anywhere in memory.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@494 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:48:28 +00:00
jens f706de00bb - _irq_dispatch(): IP masked by IM in software
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@493 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:45:29 +00:00
jens f3d4b8bdb3 - Hex reader entered at reset if GPIO.3 is active (ML402 South Button)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@492 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:44:02 +00:00
jens 48da5e410e - Flush of I/D-cache at boot
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@491 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:43:00 +00:00
jens e7b85e0138 - added pin non-maskable interrupt (NMI).
Exception vector is reset vector at (X"BFC00000")


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@490 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:41:26 +00:00
jens c5027772aa - added pin non-maskable interrupt (NMI).
Exception vector is reset vector at (X"BFC00000")
-  Interrupt pending flags (IP) are not masked in hardware by IM.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@489 cc03376c-175c-47c8-b038-4cd826a8556b
2009-10-03 16:40:29 +00:00
jens 63b60eee52 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@488 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-09 16:53:45 +00:00
jens 830f840b83 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@487 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 18:54:45 +00:00
jens 3d02793488 - detailed EX_stage according to implementation
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@486 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 17:25:09 +00:00
jens 27d59cb442 - COP dout generated from MEM_ex_result and DMEM_din with multiplexer, to reduce fanout of MEM.data.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@485 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 14:00:28 +00:00
jens 1e0fc89d3a - added COP data lines to pipeline
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@484 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 12:39:24 +00:00
jens 2316880678 minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@483 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 12:39:01 +00:00
jens e2da4a5108 update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@482 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 12:38:22 +00:00
jens 331590cc36 - Status.TS tied high to indicate absence of an MMU
- Removed possibility of writng read-only status bits
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@481 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-08 12:37:43 +00:00
jens 874ed6f824 del
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@480 cc03376c-175c-47c8-b038-4cd826a8556b
2009-08-07 12:04:54 +00:00
jens bea098d743 - doubled I-Cache size to 32kByte
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@479 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-10 09:47:24 +00:00
jens 1fe9a2c398 - replaced comparator-based fill-stage with rom-based fill-stage
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@478 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-09 19:19:03 +00:00
jens 6449f3fa78 - minor changes (better timing)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@477 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-08 22:19:35 +00:00
jens 1884f3158c - minor changes (bug)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@476 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-08 21:48:31 +00:00
jens 9794a67ba6 - Reset vector is now injected during reset like an ordinary exception.
This minimizes pc.nxt MUX (Better timing)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@475 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-08 21:44:27 +00:00
jens 6f74cd1662 - removed register output latch (latch introduced global clock buffer, which is deprecated)
- CPU is configured as BIG-endian
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@474 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-06 21:35:03 +00:00
jens f046307aa9 - removed reference to fifo_sync_dist.
Use fifo_sync instead and specified ditributed ram_style
  in XCF-file during synthesis

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@473 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-06 21:30:23 +00:00
jens 0edf614e5e - removed reference to fifo_sync_dist.
Use fifo_sync instead and specified ditributed ram_style
  in XCF-file during synthesis

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@472 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-06 10:36:58 +00:00
jens eabf73aa4f - renamed pc.is_branch:boolean to pc.branch_take:std_logic
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@471 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-05 22:07:19 +00:00
jens 3de1c312bb - removed register output latch (latch introduced global clock buffer, which is deprecated)
- added separate reg_pointer for read/write
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@470 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-05 11:07:02 +00:00
jens 1c17d74ae1 - removed INT_O_TX from UART. Use now common INT_O for RX/TX
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@469 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-03 09:30:58 +00:00
jens 134119db33 - bugfix: ICACHE_invalidate_at() after user-break was missing
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@468 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:23:01 +00:00
jens f6ce6d39e7 - removed timer stuff
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@467 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:23:00 +00:00
jens fc342f5734 - added timer stuff
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@466 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:21:48 +00:00
jens 52a8946996 - added global EL/EB switch for convenient switching between endianess
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@465 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:20:33 +00:00
jens 22149e3dfd - added searchdirs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@464 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:19:52 +00:00
jens b9bdef1e30 - bootloader is left in kernel-mode
- improved flash error handling
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@463 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:19:31 +00:00
jens efa56c97f2 - added error macros
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@462 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:18:44 +00:00
jens a2a17fd24a - improved erase/program failure detection
- added block_lock/unlock functions
- locked blocks are unlocked automatically during erase
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@461 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:18:20 +00:00
jens 66984e5b25 - added timer and error macros
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@460 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-02 16:16:49 +00:00
jens b5e1d45b20 - added test color register base + 0x80
- control signals derived from register file are noe registered for better timing
- mem_offset updated from vga_mem_offset wehn new frame begins
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@459 cc03376c-175c-47c8-b038-4cd826a8556b
2009-05-01 19:26:43 +00:00
jens 4c309f1eef - SR(7 .. 0) are not writable in user-mode
- registered 'ctrl_out.int' for better timing
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@458 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-27 08:23:08 +00:00
jens 20dc046c75 - status register is always writable
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@457 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-19 17:57:33 +00:00
jens d97c9dd6ec - added interrupt enable
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@456 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-19 17:56:47 +00:00
jens cd867dad7d - added 2. Interrupt timer
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@455 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-17 22:49:31 +00:00
jens 2e57a02355 - changed Exception vector from 0x80000180 to 0x80000080
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@454 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-17 20:30:57 +00:00
jens ef6b247b01 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@453 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-17 20:30:56 +00:00
jens 68429fd3b0 - many new tests
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@452 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:13:41 +00:00
jens 917ceced01 - switched to big-endian biuld
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@451 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:13:00 +00:00
jens 69a654f218 - added gunzip, life and r3
- switched to big-endian biuld
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@450 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:12:42 +00:00
jens 83d260fc0d - Minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@449 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:11:46 +00:00
jens 79de05d54c Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@448 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:11:45 +00:00
jens be038f16ba - changed irg-handler prototype: irq-handler now obtain pointer to exception context
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@447 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:06:30 +00:00
jens 4452820f09 - added function to register exception handlers
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@446 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:05:33 +00:00
jens 133df33e35 - increased exception stack frame to 32kB
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@445 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:04:59 +00:00
jens 47d5b9ac7f - removed unportable clock() used time() instead
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@444 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:04:21 +00:00
jens 1be58489b0 - added function for I/D-cache invalidate
- added functions for LWC0 and SWC0
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@443 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:03:20 +00:00
jens cf72d81cd3 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@442 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:02:10 +00:00
jens 0b1cd9b7b1 - added PrintBuffer8() and memdump()
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@441 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:01:08 +00:00
jens f3ee78329b - uart_baud rate is now written as DWORD
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@440 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 14:00:29 +00:00
jens 842553943a - added switch EB/EL to switch endianess
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@439 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:56:58 +00:00
jens a00c0c1a0d - added call to debugger init routine
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@438 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:46:27 +00:00
jens 30340bd6cf - added mixed I/D exceptions (13, 14)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@437 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:46:00 +00:00
jens 4372265ee2 - added big-endian to lib-searchpath
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@436 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:43:41 +00:00
jens e19528b20f - added support functions:
flash_aligned_addr_by...() to obtain block aligned addresses
- removed query in flash_find due to stack-problems
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@435 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:41:41 +00:00
jens 893e93530d - update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@434 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:39:59 +00:00
jens 2fb198d941 - added port 'eb' for Endian-big selection
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@433 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:23:30 +00:00
jens b8890b0132 - new big-endian bootloader
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@432 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:23:22 +00:00
jens d3c322ca48 - bugfix: wrong 'pa_offset' when big-endian and half-word load/store
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@431 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:22:31 +00:00
jens a3c4ba6e82 - minor improvements for load/store shifter
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@430 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:21:39 +00:00
jens 1c5db27de0 - removed SEL for register writes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@429 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-15 13:19:23 +00:00
jens f34847adb1 - some new control signals in cop0_ctrl
- added exc-Flag in WB_stage
- simplified int signals

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@428 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-11 08:37:11 +00:00
jens b5b15b90e2 - Int-port is now at cop instead of pipeline
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@427 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-11 08:35:46 +00:00
jens d3e486b6d5 Reworked exception FSM:
- Pipeline is now flushed and finished and all dependencies are solved before entering exception handler
  - User mode writes on status register are now correctly finished before status is altered by exception
  - Processor stalls for 2 cycles after RFE to ensure that status register is correct in user mode
- Added int-port


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@426 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-11 08:34:50 +00:00
jens ae50048039 - reworked exception stuff
- removed int-port (it's now in cop)

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@425 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-11 08:30:41 +00:00
jens a94fb20d4f - Update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@424 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-07 07:16:11 +00:00
jens 5b9f651efe -Mips-Pipeline stages: added missing register for PC-Branch
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@423 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-06 11:14:28 +00:00
jens 68ba887854 -Mips-Pipeline: added missing register for PC-Branch
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@422 cc03376c-175c-47c8-b038-4cd826a8556b
2009-04-06 10:35:48 +00:00
jens 6983e7ebec - removed weird feature, which prevents cop registers to be written in front of exception.
cop register behavior is now hopefully the same as general registers.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@421 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-30 23:29:33 +00:00
jens 2e1850c19b - redesigned
- added invalidate_all and invalidate_at control
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@420 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-30 22:26:15 +00:00
jens 599380bd10 - 'dcache_en' now doesn't depend on CYC_O_dmem_rd or write_busy
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@419 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-30 22:25:29 +00:00
jens eb22574d20 - changed reset generator and added BIU-Reset signal
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@418 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-30 09:05:19 +00:00
jens 1cbfc94fde - added control port
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@417 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-29 12:03:14 +00:00
jens 4dc562bfe5 - removed MUX for RESET_VECTOR in proc_stage_pc:
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@416 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-28 18:27:05 +00:00
jens e89e61291a - assigned c0_ctrl to BIU for cache_ctrl
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@415 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-28 18:26:33 +00:00
jens ad0284bd10 - added cache_ctrl input
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@414 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-28 18:25:53 +00:00
jens 962cffac1d - added cache_ctrl record. Used in c0_ctrl_out
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@413 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-28 18:25:23 +00:00
jens 7892b38128 - added Cop instructions COP0 32, COP0 33, COP 34, COP0 35:
ICACHE_invalidate_at, ICACHE_invalidate_all,
   DCACHE_invalidate_at, DCACHE_invalidate_all.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@412 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-28 18:24:35 +00:00
jens 2761d5926b - added timer inrterrupt
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@411 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-27 11:16:54 +00:00
jens 5a3f3d4cbe - removed idecode_rom.vhd
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@410 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-27 11:15:35 +00:00
jens 241658d3ba - removed idecode_rom.vhd
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@409 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-20 22:42:32 +00:00
jens 8054aedcb5 - Update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@408 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-20 20:27:23 +00:00
jens dbff927a63 - cop ouput register is now latch (better timing)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@407 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-20 19:15:11 +00:00
jens 52e9decf78 - added instructions 'lwc0' and 'swc0' for testing (which are usually invalid)
- due to cop_reg_we in MEM_Stage, the output register is removed
  (timing is slightly degraded). The reg pointer is delayed instead by one cycle
- test-reg is now writable in user mode regardles of cop0 usability.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@406 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-18 23:30:08 +00:00
jens 2dfce691ce - added instructions 'lwcz' and 'swcz'.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@405 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-18 22:40:33 +00:00
jens c97b7cdf39 - Update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@404 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-18 10:08:05 +00:00
jens 7225dcfa87 - removed idecode_rom.vhd
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@403 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-17 09:49:57 +00:00
jens 1a0e8f08f5 - removed cop_reg_rd
if cop is read is now implemented into instruction decoder
- generate 'stall_all' signal if ID/EX/MEM stall is active

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@402 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-17 09:39:07 +00:00
jens b201db2193 - new signal 'cop_read' in ctrl_lines
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@401 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-17 09:37:39 +00:00
jens 5140d7a6fa - - removed cop_reg_rd
if cop is read is now implemented into instruction decoder

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@400 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-17 09:36:58 +00:00
jens 9cb7ef5930 - more decoding of cop_signals.
New cop_read is now implemented into instruction decoder

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@399 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-17 09:36:33 +00:00
jens 4bf6b28c71 - removed 'reg_rd' which is fed into pipeline.
if cop is read is now implemented into instruction decoder
- simplified use of stall signals
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@398 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-17 09:35:39 +00:00
jens e2c40b91a1 - added COPz debugging identifier
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@397 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-16 11:46:24 +00:00
jens 8d6a5af6c8 - deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@396 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-16 11:35:42 +00:00
jens 4f99ce0c87 - added opcode debugging identfier MFCz, MTCz, CFCz, CTCz, BCTz, BCFz for COP functions
- removed COPz debugging identifier

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@395 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-16 11:34:40 +00:00
jens 81c8bf1897 - simplified instruction decoder and removed genrom functions
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@394 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-16 11:31:51 +00:00
jens e465dc860b - 'cop_dout' is now generated in pipeline in MEM_STAGE.
This gives possibility to load cop with memory contents (LWCz).
- dmem_dout can be EX_STAGE.reg_b by default or cop_din if cop_instr_en is asserted.
  This give possibility to store cop content to memory (SWCz)
- removed idecode_rom. Uses opcode_ctrl_lines() directly.



Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@393 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-16 11:30:41 +00:00
jens 180dad1fe3 - cop uses 'din' directly without delay. 'Din' is now generated in pipeline in MEM_STAGE.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@392 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-16 11:27:02 +00:00
jens c1d14214ac - new release 12
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@391 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:41:56 +00:00
jens 4f19324605 - added cop0 here
- added cache line sizes to generic

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@390 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:12:37 +00:00
jens ae421c7a15 - removed cop0
- added interface for external cop0 and copz
- reworked cop_read and cop_write signals.
  Using only cop_read which is delay in pipeline


Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@389 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:11:47 +00:00
jens b44d2ba1f9 - common functions lg2() and po2() added
- reworked cop0_ctrl_in/out types

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@388 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:09:27 +00:00
jens a332b172b3 - cleaned up: removed lg2() and po2() to mips_types
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@387 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:08:16 +00:00
jens cd8b53c3f3 - added cache config to generic to create cache info in upper 16 bits PrID
- unified control signals for later use with Copz
- cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@386 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:07:39 +00:00
jens 8282389078 - added cache line sizes to generic
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@385 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 20:05:51 +00:00
jens 2a5dd91588 - Update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@384 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 02:37:24 +00:00
jens 09d21bef97 - added detail to jbus-timing
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@383 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-15 02:19:03 +00:00
jens ac89acfbeb - deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@382 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-14 17:19:59 +00:00
jens 58f704112c - Cleanedup toolchain
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@381 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-14 17:19:29 +00:00
jens 5f24a7e1dc - FLASH alias at 0x00000000
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@380 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-14 16:38:07 +00:00
jens f643864e54 - removed timer reset dring RST_I
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@379 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-10 10:36:29 +00:00
jens bd19ea587b - Uncached DMEM is now spec. conform from A0000000..BFFFFFFF (instead A0000000..AFFFFFFF)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@378 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-08 14:06:39 +00:00
jens 538c115367 - Update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@376 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 18:32:40 +00:00
jens ea356d50e3 - date set works now correctly
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@375 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 18:23:28 +00:00
jens 2c9f747259 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@374 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 18:13:20 +00:00
jens 15ba5e691f - new release 11
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@373 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 18:13:07 +00:00
jens 6b4a578ccc Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@372 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 17:51:24 +00:00
jens c3b72ca3a9 - reformatted exception dump
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@371 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 17:49:49 +00:00
jens 32d5cf7674 - decrease RAM requirements
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@370 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 17:49:35 +00:00
jens 7cad6e874d - new target 'test_exception'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@369 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 17:49:02 +00:00
jens a7387810b9 - regsiter zeroise before main()
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@368 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 17:48:44 +00:00
jens c5394b8b22 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@367 cc03376c-175c-47c8-b038-4cd826a8556b
2009-03-01 17:48:25 +00:00
jens 548c2b4e94 - removed interrupt polarity capabilty
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@366 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-28 13:17:32 +00:00
jens 92a1179fee - removed edge trigger capabilty
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@365 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-28 12:43:53 +00:00
jens 0f52e03f7b - removed xmem_wait
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@364 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-28 12:43:02 +00:00
jens 62e35386a5 - removed edge trigger capabilty
- removed xmem_wait
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@363 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-28 12:42:44 +00:00
jens 15651ad162 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@362 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-16 22:55:34 +00:00
jens cae7d9eb39 - copies now mips_sys from templates
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@361 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-16 22:55:07 +00:00
jens 6ce723794d - inreased flash and sram to 32kB
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@360 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-16 22:53:30 +00:00
jens 8018a94936 - bug-fix: pc_is_branch is now initialized at reset (fixes CPU unrecoverable state after reset)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@359 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-16 22:48:17 +00:00
jens 08466372b2 - new release candidate 11
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@358 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-16 22:46:33 +00:00
jens 2667c79d70 - Update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@357 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-15 18:42:48 +00:00
jens 4ade970e3f - added async_port timing
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@356 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-15 17:37:43 +00:00
jens 6afb5d9c2e - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@355 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-15 17:33:07 +00:00
jens ea7e05ba30 - Cleaned up
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@354 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-15 17:32:48 +00:00
jens c3c42386d8 - reintroduced explicit 'rag_ram_re'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@353 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-15 11:09:14 +00:00
jens e874bfa228 - put dependency signals 'imem_dep', 'dmem_dep' and 'mul_dep' into structure for easier debugging
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@352 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-15 11:08:50 +00:00
jens 3057cdd154 - bugfix tools-dir
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@351 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 16:42:34 +00:00
jens 2e7765311c - new revision 10b
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@350 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 16:36:37 +00:00
jens d06519bd49 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@349 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 16:36:23 +00:00
jens 1c1eae6e8e - using env. vars for tool dirs
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@348 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 15:36:13 +00:00
jens e32cecbfe4 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@347 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 15:35:59 +00:00
jens 200cc27da2 - skipped unimportant test
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@346 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 15:35:46 +00:00
jens b656379683 - added install target
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@345 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-14 15:02:28 +00:00
jens 7d818d0db4 - vga_frontend* used wrong raster coords (y was swapped) - fixed
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@344 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-13 08:51:41 +00:00
jens 2987754b98 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@343 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-11 11:08:02 +00:00
jens 1597bc6240 - re-added state 'rd_cache'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@341 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-11 10:55:42 +00:00
jens 44ef835b7a - removed explicit tag_ram_read
- remove state 'rd_cache'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@340 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-11 10:32:19 +00:00
jens 905094be8b - put reset-logic outside pipeline
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@339 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-11 09:52:55 +00:00
jens 3def04d376 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@338 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-10 10:07:19 +00:00
jens e159dd917b - added ram section
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@337 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-10 10:07:01 +00:00
jens 1861ea2a60 - skipped initialization of UART (already done in bootloader)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@336 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-10 10:06:37 +00:00
jens 99c1ef6686 - TCL-gen for Chipscope 10.1
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@334 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-09 10:25:50 +00:00
jens 95596c23ff - new revision 10a
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@333 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-09 10:21:03 +00:00
jens 4baea1c92c - removed linking of libm
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@332 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-09 10:07:49 +00:00
jens e333f6ca2a - fixed missing nop after lw
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@331 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-09 10:07:26 +00:00
jens 295d996216 - removed sram-section
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@330 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 18:28:27 +00:00
jens 6ff7294c1e - removed ram_wb
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@329 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 18:20:42 +00:00
jens fed261182c - new build
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@328 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 18:19:18 +00:00
jens 9bff7ff2ae -rename *sync_fifo to fifo_*sync
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@327 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 17:38:46 +00:00
jens 0e825a1df5 - use async_be
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@326 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 17:34:55 +00:00
jens 5226b0bb0a - added async_be
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@325 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 17:34:18 +00:00
jens a1afb1e9c5 - SEL_O asserts correctly for uncached reads
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@324 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 17:33:34 +00:00
jens 5ce761ead5 - removed RAM-init during synthesizing
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@323 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 17:32:41 +00:00
jens 4f6b9e2082 - R0 clear during reset
- dmem_be active also during read

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@322 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-08 17:32:22 +00:00
jens 397eb46e02 - minor changes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@320 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:50:55 +00:00
jens d74ba76649 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@319 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:44:03 +00:00
jens 2895aa265a - targets 'bootloader' (without flash) and 'bootloader_flash' (with flash) available
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@318 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:43:54 +00:00
jens b9f89bb7f2 - removed flash stuff. Put flash stuff to 'bootloader_with_flash.c'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@317 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:42:55 +00:00
jens 2e6aed7e91 - copies doc/*.txt to release
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@316 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:40:58 +00:00
jens 8476888778 - new build
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@315 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:40:11 +00:00
jens 856f335db3 -added generic map for 'mips_top'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@314 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-07 11:01:15 +00:00
jens ec84f598aa - new revision 10
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@313 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-06 10:17:45 +00:00
jens 9e43596a76 - removed stall during instant_raw on same word_index (improves performance)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@312 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-04 20:13:32 +00:00
jens eebb15e773 - added memset() test
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@311 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:40:56 +00:00
jens 4282eb6221 - initializing of 'gp'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@310 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:40:44 +00:00
jens f2ea795156 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@309 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:37:54 +00:00
jens 3e6b68932f - new link.ld derived from ld-linker default
- uses small-data sections
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@308 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:37:03 +00:00
jens 1c754e35ab - using new link.ld
- omitted -no-gpopt
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@307 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:35:53 +00:00
jens 1cce8b6526 - using libsys.a
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@306 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:33:26 +00:00
jens 0ee9f8f3fa - newlib build inside GCC
- omitted -no-gpopt
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@305 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:23:06 +00:00
jens 94b90d1fef Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@304 cc03376c-175c-47c8-b038-4cd826a8556b
2009-02-01 19:22:18 +00:00
jens 30cfa326f2 - added performance values for different cache sizes
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@303 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-31 10:57:36 +00:00
jens cc122dd696 - renamed fifo
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@302 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-31 08:59:03 +00:00
jens f0636b8805 - renamed fifo ports
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@301 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:43:56 +00:00
jens 917db4cc8b - update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@300 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:43:29 +00:00
jens f3d47b0bb9 - renamed fifo_*sync_ctrl
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@299 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:30:22 +00:00
jens 5ed37017b5 - renamed fifo_*sync_ctrl
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@298 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:30:21 +00:00
jens b3da8c3d7b - renamed
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@297 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:22:25 +00:00
jens c605a19368 - deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@296 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:22:12 +00:00
jens 70a8763f3b Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@295 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:18:46 +00:00
jens e0504e7320 - deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@294 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:17:09 +00:00
jens aacedf75a9 - deleted
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@293 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:11:41 +00:00
jens f2faffb88f - renamed
git-svn-id: http://moon:8086/svn/vhdl/trunk@292 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:06:43 +00:00
jens 4d5f821e7a - added header
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@290 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-30 21:04:42 +00:00
jens 538a55d1a2 - added '-mno-gpopt'
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@289 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-26 09:56:29 +00:00
jens 0b7f09d0d9 - added sections .scommon* and .gnu*
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@288 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-26 09:53:34 +00:00
jens 342de5f159 using binutils-2.19
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@287 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 17:17:42 +00:00
jens 2c59e2959f using gcc 4.3.2
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@286 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 16:03:16 +00:00
jens 3970467a7d - flashgen: new bigendian target
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@285 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:55:57 +00:00
jens 464eb37a7d using gcc 4.3.2
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@284 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:55:17 +00:00
jens 2151b77ef3 - JBus-ports are unsigned instead of word_t
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@283 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:54:08 +00:00
jens a691c0b7fa using gcc 4.3.2
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@282 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:15:42 +00:00
jens c0985f0f53 - flashgen: new bigendian target
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@281 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:13:35 +00:00
jens 5aff9e1b93 - JBus-ports are unsigned instead of word_t
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@280 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:11:17 +00:00
jens c3507638c1 - generic for cache sizes
- JBus-ports are unsigned instead of word_t
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@279 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-24 14:10:59 +00:00
jens 4a79ecce80 - JBus-timing: removed ACK_I during write.
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@278 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-23 20:46:29 +00:00
jens 68b045848e Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@277 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-23 20:44:28 +00:00
jens f681936a59 - renamed bui, icache and dcache
git-svn-id: http://moon:8086/svn/vhdl/trunk@276 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-23 20:29:14 +00:00
jens cfe818b87b Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@274 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-21 09:57:19 +00:00
jens 9d43d91da8 - update
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@273 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-21 09:57:00 +00:00
jens 8867efa451 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@272 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-21 08:52:05 +00:00
71 changed files with 7508 additions and 3496 deletions
+100
View File
@@ -0,0 +1,100 @@
-----------------------------------------------------------------
Changes in release 13
-----------------------------------------------------------------
- mips_biu.vhd: added asynchronous BUS-FIFOs to support different clocks for CPU and BUS
- mips_dcache.vhd: improved instant-RAW stall behavior (faster execution)
- uart_WB.vhd: added simulate_TX generic for plain TX output in simulation log
-----------------------------------------------------------------
Changes in release 12
-----------------------------------------------------------------
- reworked GCC-toolchain: Valid mips*-elf-binaries are now compiled and linked
using a single mips*-elf-gcc command.
To use: Copy $THIS_RELEASE/bsp/toolchain/specs to $MIPS_GCC_PREFIX/lib/gcc/mipsel-elf/$GCC_VERSION/,
and see bsp/examples/Makefile gcc usage
GCC-provided crt*-functions are now called without problems.
In summary: The toolchain is now more compliant to the intentional use of GCC.
- mips_biu.vhd: Addresses 0xA0000000..0xBFFFFFFF are now un-dcached for memory-mapped I/O,
which is now compliant to literature.
- gpio_wb.vhd: Timer hard-reset is now removed. This helps to keep current time in case of CPU hard-reset.
- new bsp-example source: gunzip
- updated drawing 'mips_jbus_timing.pdf'
- added drawing 'memory_map.pdf'
- moved COP0 from mips_pipeline.vhd to mips_top.vhd. Created new cop-interface for later COPz connection.
- added I/D-cache info (size and linesize) to upper 16 bits of PrID-Register.
Example of reading cache info is done in bsp/examples/testbench::PrintCPUinfo()
- simplified instruction decoder in mips_instr.vhd. Now there are less warnings during synthesis.
Removed idecode_rom.vhd from project as consequence.
- added cop0 instructions to invalidate I-cache and D-Cache
- added copz instructions lwcz and swcz
- gpio_wb.vhd: added 32 bit timer with interrupt and auto reload
- added debugger in libsys. New files are mipsdis.c/h and dbg.c/h
- exception handlers can now be registered to any exception type
- bugfix mips_pipeline/mips_cop: cop0 registers were not written during exception commit. Cop registers now behave like general registers.
- added pin 'eb' to mips_top.vhd to select CPU-endianess at reset time (eb = 0 : little-endian, eb = 1 : big-endian)
- Status register bit 'RE'= 1 (bit 25) reverses endianess in user-mode
- Status register bit 'TS' (TLB Shutdown, bit 21) is tied high to indicate the absence of an MMU.
- uart_wb.vhd: added interrupt enable
- Interrupt pending flags (IP) are not anymore masked by Interrupt mask flags (IM) in H/W.
Masking has to be done in S/W. H/W masking was removed because it isn't MIPS-compliant.
- added NMI/RST pin (more MIPS compliant). Transition Asserting/Deasserting causes exception.
Exception vector is reset (0xBFC00000). It's a soft-reset, which can help debugging. NMI/RST is not maskable.
Using NMI/RST as reset is dangerous because periphery may not be reseted. Has to be done in S/W.
Drawback of using NMI/RST: Unitialized/unreseted periphery may cause trouble (e.g. firing unwanted interrupts), but I think you know that already.
- Bootloader: Startup.S now invalidates I/D-Caches at boot.
- uart_wb.vhd: fixed crappy tx-empty interrupt, Added Tx-IRQ acknowledge.
- Bugfix in mips_pipeline: register bypass with same target register, used for unaligned loads (LWL, LWR), was incorrect.
Newlib's MIPS-optimized version of memcpy() uses this for unaligned copy which revealed the bug.
Symptom: Consecutive load instructions without nops using same target register (which is legal) like
lw $1, 0(mem)
lwl $1, 1(mem)
or
lwl $1, 0(mem)
lwr $1, 1(mem)
or similar, lead to incorrect result. Now it's fixed.
- Bugfix mips_biu: instructions uncached LW => cached LW (with cache-miss) was buggy.
Symptom:
...
1.: lw $a0, 32($s0) # Uncached load from memory mapped I/O
2.: lw $a2, 4($v0) # Cached load and cache-miss.
# $a0 receives same value as $a2.
# CPU skips writing $a0 due to busy flag of D-Cache,
# which is already active in the previous cycle
...
-----------------------------------------------------------------
Changes in release 11
-----------------------------------------------------------------
- bugfix in mips_pipeline: pc_is_branch is now initialized at reset
(fixes CPU unrecoverable state after reset)
- reverted "optimization" in mips_dcache, which behaved buggy during exceptions
- new example source: test_exception
- minor changes in libsys
- added async_port_timing in doc
- examples/testbench: date set now really works
-----------------------------------------------------------------
Changes in release 10b
-----------------------------------------------------------------
- bugfix: fixed compiler bug (missing nop after lw) in bootloader,
which caused exception during boot
-----------------------------------------------------------------
Changes in release 10a
-----------------------------------------------------------------
async_port_wb:
- added byte enable for async_port
bootloader.c
- bugfix: fixed compiler bug (missing nop after lw)
mips-core
- bugfix: SEL_O lines are also asserted correctly during reads
tools/romgen
- TCL-Jtag now compatible with Chipscope 10.1
mips_sys.c
- use byte enable for sram and flash
+109
View File
@@ -0,0 +1,109 @@
-----------------------------------------------------------------
J-MIPS Features
-----------------------------------------------------------------
- Synchrones Design
- Portable Beschreibung in VHDL
- Kompatible zur GNU Toolchain (Binutils, GCC, Newlib)
- Befehle kompatibel mit MIPS-1 ISA (z.B. MIPS R3000)
- 5-Stufige Pipeline und Hazardvermeidung durch Forwarding
- 64Bit Multiplier (32Bit Operanden), 12 Cycles Latenz
- 64Bit Divider (32Bit Operanden), 36 Cycles Latenz
- Coprocessor 0 (COP0) für Exceptionhandling
- Direct-mapped Instruction Cache mit variabler Größe, 8-words per Line
- Direct-mapped Data Cache mit variabler Größe, 8-words per Line
- J-Bus kompatible Bus Interface Unit (J-Bus ist im wesentlichen FIFO interface mit 'wichtigen' Signalnamen)
- 1,2 DMIPS/MHz mit 16Kbyte I/D-Cache (Dhrystone 2.1, GCC 4.3)
- Endianness umschaltbar zur Hard-reset Zeit
- Unterschiedliche Frequenzen für CPU und BUS möglich
-----------------------------------------------------------------
Known Limitations
-----------------------------------------------------------------
- keine MMU
- keine Unterstützung für Bus exceptions IBE und DBE
- kein externes Coprocessor interface (COP1..3) für z.B. FPU
- Befehle für Cop1..3 nicht implementiert:
CFCz, CTCz, COPz, MFCz, MTCz, LWCz, SWCz
Benutzung dieser Befehle führt zur Exception 'RI' (Reserved Instruction)
- nicht alle COP0 Register/Bits vorhanden.
-----------------------------------------------------------------
Known Bugs
-----------------------------------------------------------------
- es gibt bestimmt noch nicht entdeckte Bugs
-----------------------------------------------------------------
Known Optimizations
-----------------------------------------------------------------
- Area: Multiplier als technologieabhängiges Primitive instanzieren
- Area: Auf Divider verzichten
- Area: Auf Multiplier verzichten
- Area vs. Speed: Bei Hazards Pipeline-stall statt Forwarding.
Durch Stalling geringerer Befehlsdurchsatz dafür weniger Logik.
Weniger Logik bedeutet vielleicht wieder auch größere Taktfrequenz.
-----------------------------------------------------------------
Known ToDos
-----------------------------------------------------------------
- Unterstützung für Bus exceptions IBE und DBE
- Externes COP1..3 interface, fehlende COP-Befehle implementieren
- Optimierungen evaluieren und ggf. durchführen
-----------------------------------------------------------------
Synthesis results
-----------------------------------------------------------------
Virtex-4 XC4VSX35-10
Config: 16Kbyte I/D-Cache
Number of Slices 2387 15360 15%
Number of Slice Flip Flops 1784 30720 5%
Number of 4 input LUTs 3962 30720 12%
Number of FIFO16/RAMB16s 18 192 9%
Speed: 110MHz nach Synthesis
-----------------------------------------------------------------
Virtex-1 XCV1000-4
Config: 4Kbyte I/D-Cache
Number of Slices 2045 13824 16%
Number of Slice Flip Flops 1783 27648 7%
Number of 4 input LUTs 3923 27648 15%
Number of FIFO16/RAMB16s 20 32 62%
Speed: 30MHz nach Synthesis
-----------------------------------------------------------------
Performance bei 100MHz
- GCC ohne Small-data section
- MIPS Rev. 9
-----------------------------------------------------------------
I/D-Cache Dhrystone-2.1 RipeMD-160 Whetstone Stanford Queens(12x12)
1k 32 DMIPS 5 Mbit/s 345 kwhets/s 47/767 2,135s
2k 51 DMIPS 5 Mbit/s 534 kwhets/s 38/561 2,134s
4k 72 DMIPS 5 Mbit/s 623 kwhets/s 36/259 2,121s
8k 98 DMIPS 10 Mbit/s 1149 kwhets/s 31/228 1,938s
16k 115 DMIPS 17 Mbit/s 1234 kwhets/s 23/225 1,938s
32k 115 DMIPS 17 Mbit/s 1285 kwhets/s 24/218 1,938s
64k 115 DMIPS 17 Mbit/s 1285 kwhets/s 20/221 1,938s
-----------------------------------------------------------------
Performance bei 100MHz
- GCC mit Small-data section
- MIPS Rev. 9
-----------------------------------------------------------------
I/D-Cache Dhrystone-2.1 RipeMD-160 Whetstone Stanford Queens(12x12)
16k 117 DMIPS 17 Mbit/s 1236 kwhets/s 24/230 1,811s
-----------------------------------------------------------------
Performance bei 100MHz
- GCC mit Small-data section
- MIPS Rev. 10
-----------------------------------------------------------------
I/D-Cache Dhrystone-2.1 RipeMD-160 Whetstone Stanford Queens(12x12)
16k 120 DMIPS 17 Mbit/s 1242 kwhets/s 25/219 1,803s
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,46 @@
# ---------------------------------------------------------------
# 1. Binutils bauen und installieren
# ---------------------------------------------------------------
> tar -xzf binutils-2.19.tar.gz
> mkdir binutils-2.19_build
> cd binutils-2.19_build
> ../binutils-2.19/configure --target=mipsel-elf --prefix=/usr/local
> make
> make install
# ---------------------------------------------------------------
# 2. GCC bootstrapping
# ---------------------------------------------------------------
> tar -xzf gcc-4.3.2.tar.gz
> mkdir gcc-4.3.2_build
> cd gcc-4.3.2_build
> ../gcc-4.3.2/configure --target=mipsel-elf --prefix=/usr/local --enable-languages="c,c++" --without-headers --with-newlib --with-float=soft --disable-multilib
> CFLAGS_FOR_TARGET="-mno-gpopt" make all-gcc
> make info-gcc
> make install-gcc
# ---------------------------------------------------------------
# 3. Newlib bauen und installieren
# ---------------------------------------------------------------
> tar -xzf newlib-1.16.0.tar.gz
! Bug in newlib-1.16.0/newlib/libc/machine/mips/strlen.c.
Newlib von Hand patchen (32-bit MIPS targets):
"lbu $3,0($4)\n"
"nop\n" <= nop einfügen
"bnez $3,1b\n"
> mkdir newlib-1.16.0_build
> cd newlib-1.16.0_build
> ../newlib-1.16.0/configure --target=mipsel-elf --prefix=/usr/local --with-float=soft --disable-multilib
> TARGET_CFLAGS="-mno-gpopt" make all
> make install
# ---------------------------------------------------------------
# 4. GCC bauen und installieren
# ---------------------------------------------------------------
> cd gcc-4.3.2_build
> ../gcc-4.3.2/configure --target=mipsel-elf --prefix=/usr/local --enable-languages="c,c++" --disable-shared --with-newlib --with-float=soft --disable-multilib
> CFLAGS_FOR_TARGET="-mno-gpopt" make all
> make info
> make install
+151
View File
@@ -0,0 +1,151 @@
#!/bin/sh
TARGET=mipsel-elf
PREFIX=/usr/local
SRC_BINUTILS=binutils-2.19
SRC_GCC=gcc-4.3.3
SRC_NEWLIB=newlib-1.16.0
SRC_GMP=gmp-4.2.4
SRC_MPFR=mpfr-2.4.0
# ---------------------------------------------------------------
# 1. Binutils bauen und installieren
# ---------------------------------------------------------------
if [ ! -e $SRC_BINUTILS.tar.bz2 ]; then
echo Downloading $SRC_BINUTILS
wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/binutils/$SRC_BINUTILS.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_BINUTILS
fi
if [ ! -e ./$SRC_BINUTILS ]; then
echo Unpacking $SRC_BINUTILS
tar -xjf $SRC_BINUTILS.tar.bz2 || exit 1
else
echo Skipped unpacking $SRC_BINUTILS
fi
if [ ! -e ./$SRC_BINUTILS-build ]; then
echo Building $SRC_BINUTILS
mkdir -p $SRC_BINUTILS-build
cd $SRC_BINUTILS-build
../$SRC_BINUTILS/configure --target=$TARGET --prefix=$PREFIX || exit 1
make || exit 1
make install || exit 1
cd ..
else
echo $SRC_BINUTILS is already built.
fi
# ---------------------------------------------------------------
# 2. GMP bauen und installieren
# ---------------------------------------------------------------
if [ ! -e $SRC_GMP.tar.bz2 ]; then
echo Downloading $SRC_GMP
wget http://ftp.sunet.se/pub/gnu/gmp/$SRC_GMP.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_GMP
fi
if [ ! -e ./$SRC_GMP ]; then
echo Unpacking $SRC_GMP
tar -xjf $SRC_GMP.tar.bz2 || exit 1
else
echo Skipped unpacking $SRC_GMP
fi
if [ ! -e ./$SRC_GMP-build ]; then
echo Building $SRC_GMP
mkdir -p $SRC_GMP-build
cd $SRC_GMP-build
../$SRC_GMP/configure --prefix=$PREFIX || exit 1
make || exit 1
make check || exit 1
make install || exit 1
cd ..
else
echo $SRC_GMP is already built.
fi
# ---------------------------------------------------------------
# 3. MPFR bauen und installieren
# ---------------------------------------------------------------
if [ ! -e $SRC_MPFR.tar.bz2 ]; then
echo Downloading $SRC_MPFR
wget http://www.mpfr.org/mpfr-current/$SRC_MPFR.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_MPFR
fi
if [ ! -e ./$SRC_MPFR ]; then
echo Unpacking $SRC_MPFR
tar -xjf $SRC_MPFR.tar.bz2 || exit 1
else
echo Skipped unpacking $SRC_MPFR
fi
if [ ! -e ./$SRC_MPFR-build ]; then
echo Building $SRC_MPFR
mkdir -p $SRC_MPFR-build
cd $SRC_MPFR-build
../$SRC_MPFR/configure --prefix=$PREFIX || exit 1
make || exit 1
make check || exit 1
make install || exit 1
cd ..
else
echo $SRC_MPFR is already built.
fi
# ---------------------------------------------------------------
# 4. GCC & newlib bauen und installieren
# ---------------------------------------------------------------
if [ ! -e $SRC_NEWLIB.tar.gz ]; then
echo Downloading $SRC_NEWLIB
wget ftp://sources.redhat.com/pub/newlib/$SRC_NEWLIB.tar.gz || exit 1
else
echo Skipped downloading $SRC_NEWLIB
fi
if [ ! -e ./$SRC_NEWLIB ]; then
echo Unpacking $SRC_NEWLIB
tar -xzf $SRC_NEWLIB.tar.gz || exit 1
if [ -e $SRC_NEWLIB-jens.patch ]; then
echo Patching $SRC_NEWLIB
patch -p0 < $SRC_NEWLIB-jens.patch || exit 1
fi
else
echo Skipped unpacking $SRC_NEWLIB
fi
if [ ! -e $SRC_GCC.tar.bz2 ]; then
echo Downloading $SRC_GCC
wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/gcc/$SRC_GCC/$SRC_GCC.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_GCC
fi
if [ ! -e ./$SRC_GCC ]; then
echo Unpacking $SRC_GCC
tar -xjf $SRC_GCC.tar.bz2 || exit 1
cd ./$SRC_GCC
ln -sf ../$SRC_NEWLIB/newlib/ .
cd ..
else
echo Skipped unpacking $SRC_GCC
fi
if [ ! -e ./$SRC_GCC-build ]; then
echo Building $SRC_GCC
mkdir -p $SRC_GCC-build
cd $SRC_GCC-build
../$SRC_GCC/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --with-newlib --verbose --enable-languages="c,c++" || exit 1
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib make all || exit 1
make info || exit 1
make install || exit 1
cd ..
echo $PREFIX/lib >/etc/ld.so.conf.d/local.conf
ldconfig
else
echo $SRC_GCC is already built.
fi
@@ -0,0 +1,11 @@
diff -Naur newlib-1.16.0/newlib/libc/machine/mips/strlen.c newlib-1.16.0-fixed/newlib/libc/machine/mips/strlen.c
--- newlib-1.16.0/newlib/libc/machine/mips/strlen.c 2002-03-14 03:41:43.000000000 +0100
+++ newlib-1.16.0-fixed/newlib/libc/machine/mips/strlen.c 2009-02-14 15:52:58.000000000 +0100
@@ -60,6 +60,7 @@
" addiu $2,$4,1\n"
"\n"
"1: lbu $3,0($4)\n"
+ " nop\n"
" bnez $3,1b\n"
" addiu $4,$4,1\n"
"\n"
@@ -0,0 +1,11 @@
diff -Naur newlib-1.17.0/newlib/libc/machine/mips/strlen.c newlib-1.17.0-fixed/newlib/libc/machine/mips/strlen.c
--- newlib-1.17.0/newlib/libc/machine/mips/strlen.c 2002-03-14 03:41:43.000000000 +0100
+++ newlib-1.17.0-fixed/newlib/libc/machine/mips/strlen.c 2009-02-14 15:45:19.000000000 +0100
@@ -60,6 +60,7 @@
" addiu $2,$4,1\n"
"\n"
"1: lbu $3,0($4)\n"
+ " nop\n"
" bnez $3,1b\n"
" addiu $4,$4,1\n"
"\n"
Binary file not shown.
Binary file not shown.
-15
View File
@@ -1,15 +0,0 @@
## NOTE: Do not edit this file.
##
vlib work
vcom -explicit -93 "../../../PCK_FIO-1.16/PCK_FIO.vhd"
vcom -explicit -93 "../src/core/mips_types.vhd"
vcom -explicit -93 "../src/core/mips_instr.vhd"
vcom -explicit -93 "../src/core/mips_muldiv.vhd"
vcom -explicit -93 "../src/tb_mips_muldiv.vhd"
vsim -t 1ps -lib work tb_mips_muldiv
do {tb_mips_muldiv.wdo}
view wave
view structure
view signals
run 8ms
-78
View File
@@ -1,78 +0,0 @@
onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate -format Logic /tb_mips_muldiv/rst
add wave -noupdate -format Logic /tb_mips_muldiv/clk
add wave -noupdate -format Logic /tb_mips_muldiv/mul_divn
add wave -noupdate -format Logic /tb_mips_muldiv/start
add wave -noupdate -format Logic /tb_mips_muldiv/busy
add wave -noupdate -format Logic /tb_mips_muldiv/s_un
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/ref_hi
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/din_hi
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/din_lo
add wave -noupdate -format Logic /tb_mips_muldiv/hilo_sel
add wave -noupdate -format Logic /tb_mips_muldiv/hilo_we
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/dout
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/ref_result
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/md_result
add wave -noupdate -format Logic /tb_mips_muldiv/check
add wave -noupdate -format Logic /tb_mips_muldiv/uut/pre_sum_vld
add wave -noupdate -format Logic /tb_mips_muldiv/uut/mul_en
add wave -noupdate -format Logic /tb_mips_muldiv/uut/sum_en
add wave -noupdate -divider FSM
add wave -noupdate -format Literal /tb_mips_muldiv/uut/cycle_cnt
add wave -noupdate -format Logic /tb_mips_muldiv/uut/cycle_cnt_load
add wave -noupdate -format Literal /tb_mips_muldiv/uut/cycle_cnt_preset
add wave -noupdate -format Literal /tb_mips_muldiv/uut/s
add wave -noupdate -format Literal /tb_mips_muldiv/uut/sn
add wave -noupdate -divider {Multiplier internals}
add wave -noupdate -format Literal -radix hexadecimal -expand /tb_mips_muldiv/uut/pprod
add wave -noupdate -format Literal /tb_mips_muldiv/uut/ppadd_cyi
add wave -noupdate -format Literal /tb_mips_muldiv/uut/ppadd_cyo
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/ppadd_op1
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/ppadd_op2
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/ppadd_res
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/pp_op2
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/pp_op2_r
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/add_op1
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/add_op2
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/add_res
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/pp_reg
add wave -noupdate -divider {Divider internals}
add wave -noupdate -format Logic /tb_mips_muldiv/busy
add wave -noupdate -format Logic /tb_mips_muldiv/s_un
add wave -noupdate -format Logic /tb_mips_muldiv/uut/div_start
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/din_hi
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/din_lo
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/result
add wave -noupdate -format Logic /tb_mips_muldiv/uut/div_add_cyi
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_add_op1
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_add_op2
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_add_res
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_m
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_m_n
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_a
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_muldiv/uut/div_q
add wave -noupdate -format Logic /tb_mips_muldiv/uut/div_qbit
add wave -noupdate -format Logic /tb_mips_muldiv/uut/div_en
add wave -noupdate -divider FSM
add wave -noupdate -format Literal /tb_mips_muldiv/uut/cycle_cnt
add wave -noupdate -format Logic /tb_mips_muldiv/uut/cycle_cnt_load
add wave -noupdate -format Literal /tb_mips_muldiv/uut/cycle_cnt_preset
add wave -noupdate -format Literal /tb_mips_muldiv/uut/s
add wave -noupdate -format Literal /tb_mips_muldiv/uut/sn
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {7735999838 ps} 0} {{Cursor 2} {512321 ps} 0}
configure wave -namecolwidth 149
configure wave -valuecolwidth 171
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 100
configure wave -griddelta 40
configure wave -timeline 1
update
WaveRestoreZoom {0 ps} {8400 us}
+42
View File
@@ -0,0 +1,42 @@
vlib work
vcom -explicit -93 "../src/dpram_2w2r.vhd"
vcom -explicit -93 "../src/dpram_1w1r.vhd"
vcom -explicit -93 "../src/fifo_ctrl_pkg.vhd"
vcom -explicit -93 "../src/gray_counter.vhd"
vcom -explicit -93 "../src/fifo_sync_ctrl.vhd"
vcom -explicit -93 "../src/fifo_sync.vhd"
vcom -explicit -93 "../src/fifo_async_ctrl.vhd"
vcom -explicit -93 "../src/fifo_async.vhd"
vcom -explicit -93 "../src/bbfifo_16x8.vhd"
vcom -explicit -93 "../src/kcuart_rx.vhd"
vcom -explicit -93 "../src/kcuart_tx.vhd"
vcom -explicit -93 "../src/uart_rx.vhd"
vcom -explicit -93 "../src/uart_tx.vhd"
vcom -explicit -93 "../src/uart_wb.vhd"
vcom -explicit -93 "../src/gpio_wb.vhd"
vcom -explicit -93 "../src/async_types.vhd"
vcom -explicit -93 "../src/async_port_wb.vhd"
vcom -explicit -93 "../src/async_defs.vhd"
vcom -explicit -93 "../src/bootloader.ROM.vhd"
vcom -explicit -93 "../src/rom_wb.vhd"
vcom -explicit -93 "../src/mips_types.vhd"
vcom -explicit -93 "../src/mips_instr.vhd"
vcom -explicit -93 "../src/mips_reg.vhd"
vcom -explicit -93 "../src/mips_shifter.vhd"
vcom -explicit -93 "../src/mips_alu.vhd"
vcom -explicit -93 "../src/mips_muldiv.vhd"
vcom -explicit -93 "../src/mips_cop.vhd"
vcom -explicit -93 "../src/mips_icache.vhd"
vcom -explicit -93 "../src/mips_dcache.vhd"
vcom -explicit -93 "../src/mips_biu.vhd"
vcom -explicit -93 "../src/mips_bcu.vhd"
vcom -explicit -93 "../src/mips_pipeline.vhd"
vcom -explicit -93 "../src/mips_top.vhd"
vcom -explicit -93 "../src/mips_sys.vhd"
vcom -explicit -93 "../src/tb_mips_sys.vhd"
vsim -t 1ps -lib work tb_mips_sys
do {tb_mips_sys.wdo}
view wave
view structure
view signals
run 3000us
+45
View File
@@ -0,0 +1,45 @@
onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate -divider {MIPS top}
add wave -noupdate -format Literal /tb_mips_sys/debug
add wave -noupdate -format Logic /tb_mips_sys/rst
add wave -noupdate -format Logic /tb_mips_sys/clk
add wave -noupdate -divider Flash
add wave -noupdate -format Logic /tb_mips_sys/clk
add wave -noupdate -format Logic /tb_mips_sys/flash_cs_n
add wave -noupdate -format Logic /tb_mips_sys/flash_oe_n
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/flash_a
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/flash_d
add wave -noupdate -divider SRAM
add wave -noupdate -format Logic /tb_mips_sys/clk
add wave -noupdate -format Logic /tb_mips_sys/sram_cs_n
add wave -noupdate -format Literal /tb_mips_sys/sram_wr_n
add wave -noupdate -format Logic /tb_mips_sys/sram_oe_n
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/sram_a
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/sram_d
add wave -noupdate -divider GPIO
add wave -noupdate -format Logic /tb_mips_sys/clk
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/gpo0
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/gpo1
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/gpi0
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_sys/gpi1
add wave -noupdate -divider UART
add wave -noupdate -format Logic /tb_mips_sys/clk
add wave -noupdate -format Logic /tb_mips_sys/rx
add wave -noupdate -format Logic /tb_mips_sys/tx
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {1165707237 ps} 0}
configure wave -namecolwidth 150
configure wave -valuecolwidth 100
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 100
configure wave -griddelta 40
configure wave -timeline 1
update
WaveRestoreZoom {0 ps} {3150 us}
-57
View File
@@ -1,57 +0,0 @@
## NOTE: Do not edit this file.
##
vlib work
# RAMS
vcom -explicit -93 "../../../misc/dpram_2w2r.vhd"
vcom -explicit -93 "../../../misc/dpram_1w1r.vhd"
vcom -explicit -93 "../../../misc/dpram_1w1r_dist.vhd"
# FIFOS
vcom -explicit -93 "../../../FIFO/src/fifo_ctrl_pkg.vhd"
vcom -explicit -93 "../../../FIFO/src/sync_fifo_ctrl.vhd"
vcom -explicit -93 "../../../FIFO/src/fifo_sync_dist.vhd"
# UART
vcom -explicit -93 "../../../uart/bbfifo_16x8.vhd"
vcom -explicit -93 "../../../uart/kcuart_rx.vhd"
vcom -explicit -93 "../../../uart/kcuart_tx.vhd"
vcom -explicit -93 "../../../uart/uart_rx.vhd"
vcom -explicit -93 "../../../uart/uart_tx.vhd"
vcom -explicit -93 "../../../uart/uart_wb.vhd"
# GPIO
vcom -explicit -93 "../../../misc/gpio_wb.vhd"
# Async port
vcom -explicit -93 "../../../misc/async_types.vhd"
vcom -explicit -93 "../../../misc/async_port_wb.vhd"
vcom -explicit -93 "../src/async_defs.vhd"
# ROM
vcom -explicit -93 "../src/bootloader.ROM.vhd"
vcom -explicit -93 "../../../misc/rom_wb.vhd"
# MIPS
vcom -explicit -93 "../src/core/mips_types.vhd"
vcom -explicit -93 "../src/core/mips_instr.vhd"
vcom -explicit -93 "../src/core/mips_idecode_rom.vhd"
vcom -explicit -93 "../src/core/mips_reg.vhd"
vcom -explicit -93 "../src/core/mips_shifter.vhd"
vcom -explicit -93 "../src/core/mips_alu.vhd"
vcom -explicit -93 "../src/core/mips_muldiv.vhd"
vcom -explicit -93 "../src/core/mips_cop.vhd"
vcom -explicit -93 "../src/core/mips_icache.vhd"
vcom -explicit -93 "../src/core/mips_dcache.vhd"
vcom -explicit -93 "../src/core/mips_biu.vhd"
vcom -explicit -93 "../src/core/mips_bcu.vhd"
vcom -explicit -93 "../src/core/mips_pipeline.vhd"
vcom -explicit -93 "../src/core/mips_top.vhd"
vcom -explicit -93 "../src/tb_mips_top.vhd"
vsim -t 1ps -lib work tb_mips_top
do {tb_mips_top.wdo}
view wave
view structure
view signals
run 1600us
-67
View File
@@ -1,67 +0,0 @@
onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate -divider {TOP interface}
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal /tb_mips_top/debug
add wave -noupdate -format Logic /tb_mips_top/stb_o
add wave -noupdate -format Logic /tb_mips_top/ack_i
add wave -noupdate -format Logic /tb_mips_top/srdy_i
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/addr_o
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/dat_i
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/dat_o
add wave -noupdate -format Logic /tb_mips_top/we_o
add wave -noupdate -format Literal /tb_mips_top/sel_o
add wave -noupdate -format Logic /tb_mips_top/cyc_o
add wave -noupdate -format Logic /tb_mips_top/mrdy_o
add wave -noupdate -format Literal /tb_mips_top/int
add wave -noupdate -divider {External components}
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/gpo0
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/gpo1
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/gpi0
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/gpi1
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Logic /tb_mips_top/rx
add wave -noupdate -format Logic /tb_mips_top/tx
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal /tb_mips_top/mem_area
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/sram_a
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/sram_d
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/flash_a
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/flash_d
add wave -noupdate -format Logic /tb_mips_top/flash_cs_n
add wave -noupdate -format Logic /tb_mips_top/flash_oe_n
add wave -noupdate -format Logic /tb_mips_top/sram_cs_n
add wave -noupdate -format Literal /tb_mips_top/sram_wr_n
add wave -noupdate -format Logic /tb_mips_top/sram_oe_n
add wave -noupdate -divider ALU
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal /tb_mips_top/uut/inst_pipeline/hdu
add wave -noupdate -divider PC
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal -radix hexadecimal /tb_mips_top/uut/inst_pipeline/pc
add wave -noupdate -divider PC
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal -radix hexadecimal -expand /tb_mips_top/uut/inst_pipeline/id_stage
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal -radix hexadecimal -expand /tb_mips_top/uut/inst_pipeline/ex_stage
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal -radix hexadecimal -expand /tb_mips_top/uut/inst_pipeline/mem_stage
add wave -noupdate -format Logic /tb_mips_top/clk
add wave -noupdate -format Literal -radix hexadecimal -expand /tb_mips_top/uut/inst_pipeline/wb_stage
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {1199854590 ps} 0}
configure wave -namecolwidth 188
configure wave -valuecolwidth 100
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 100
configure wave -griddelta 40
configure wave -timeline 1
update
WaveRestoreZoom {0 ps} {1260 us}
+20 -12
View File
@@ -31,29 +31,37 @@ package async_defs is
constant ts_flash : async_timespec_t := constant ts_flash : async_timespec_t :=
( (
ncyc_access => 1, T_leadin => 00.0,
ncyc_pulse_rd => 12, T_pulse_rd => 120.0,
ncyc_pulse_wr => 7, T_pulse_wr => 70.0,
ncyc_cs_hold => 1, T_leadout => 00.0,
ncyc_release => 1, T_release => 40.0,
ncyc_pulse_rst => 8, T_pulse_rst => 80.0,
T_pulse_page_rd => 30.0,
can_page_rd => true,
nbits_page_rd => 4,
pol_cs => '0', pol_cs => '0',
pol_oe => '0', pol_oe => '0',
pol_we => '0', pol_we => '0',
pol_be => '0',
pol_rst => '0' pol_rst => '0'
); );
constant ts_sram : async_timespec_t := constant ts_sram : async_timespec_t :=
( (
ncyc_access => 1, T_leadin => 00.0,
ncyc_pulse_rd => 12, T_pulse_rd => 10.0,
ncyc_pulse_wr => 7, T_pulse_wr => 10.0,
ncyc_cs_hold => 1, T_leadout => 00.0,
ncyc_release => 1, T_release => 00.0,
ncyc_pulse_rst => 8, T_pulse_rst => 80.0,
T_pulse_page_rd => 20.0,
can_page_rd => false,
nbits_page_rd => 5,
pol_cs => '0', pol_cs => '0',
pol_oe => '0', pol_oe => '0',
pol_we => '0', pol_we => '0',
pol_be => '0',
pol_rst => '0' pol_rst => '0'
); );
File diff suppressed because it is too large Load Diff
+12
View File
@@ -0,0 +1,12 @@
VHDL/lib/CPUs/MIPS/src/core/dcache.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_dcache.vhd
VHDL/lib/CPUs/MIPS/src/core/icache.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_icache.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_biu.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_bui.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_biu.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_dcache.vhd
VHDL/lib/CPUs/MIPS/src/core/mips_icache.vhd
+281 -181
View File
@@ -1,7 +1,29 @@
--------------------------------------------------------------------------
-- Project: JIPS, a portable 32-bit RISC CPU written in VHDL
-- This file: JIPS top file
--
-- Copyright (C) 2008 J. Ahrensfeld
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
--------------------------------------------------------------------------
LIBRARY IEEE; LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL; USE IEEE.NUMERIC_STD.ALL;
use IEEE.MATH_REAL.ALL;
library work; library work;
use work.mips_types.all; use work.mips_types.all;
@@ -18,11 +40,12 @@ ENTITY dcache IS
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
MRDY_O : out STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out word_t;
DAT_I : in word_t; DAT_I : in word_t;
STB_O : out STD_LOGIC; STB_O : out STD_LOGIC;
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
en : in STD_LOGIC; ctrl : in cache_ctrl_t;
cpu_en : in STD_LOGIC; cpu_en : in STD_LOGIC;
cpu_we : in STD_LOGIC; cpu_we : in STD_LOGIC;
cpu_be : in unsigned(3 downto 0); cpu_be : in unsigned(3 downto 0);
@@ -77,25 +100,15 @@ COMPONENT dpram_2w2r is
); );
END COMPONENT; END COMPONENT;
function lg2(x : natural) return natural is constant addr_width : natural := 32;
begin
return natural(ceil(log2(real(x))));
end lg2;
function po2(x : natural) return natural is
begin
return 2**lg2(x);
end po2;
constant word_index_width : natural := lg2(line_size); constant word_index_width : natural := lg2(line_size);
constant cache_index_width : natural := lg2(cache_size) - word_index_width; constant cache_index_width : natural := lg2(cache_size) - word_index_width;
constant tag_width : natural := 32 - word_index_width - cache_index_width - 2; constant tag_width : natural := addr_width - word_index_width - cache_index_width - 2;
constant tag_parity_width : natural := 3; constant tag_parity_width : natural := 3;
constant tram_data_width : natural := 1 + tag_parity_width + tag_width; constant tag_ram_data_width : natural := 1 + tag_parity_width + tag_width;
constant tram_addr_width : natural := cache_index_width; constant tag_ram_addr_width : natural := cache_index_width;
subtype tram_data_t is unsigned (tram_data_width-1 downto 0); subtype tag_ram_data_t is unsigned (tag_ram_data_width-1 downto 0);
type dcache_entry_t is record type dcache_entry_t is record
valid : std_logic; valid : std_logic;
@@ -103,11 +116,7 @@ END COMPONENT;
tag : unsigned(tag_width-1 downto 0); tag : unsigned(tag_width-1 downto 0);
end record; end record;
alias cpu_word_index is cpu_addr(word_index_width+1 downto 2); function to_dcache_entry(x : tag_ram_data_t) return dcache_entry_t is
alias cpu_cache_index is cpu_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias cpu_tag is cpu_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
function to_dcache_entry(x : tram_data_t) return dcache_entry_t is
variable result : dcache_entry_t; variable result : dcache_entry_t;
begin begin
result.valid := x(0); result.valid := x(0);
@@ -117,106 +126,141 @@ END COMPONENT;
return result; return result;
end to_dcache_entry; end to_dcache_entry;
function to_tram_data(x : dcache_entry_t) return tram_data_t is function to_tag_ram_data(x : dcache_entry_t) return tag_ram_data_t is
variable result : tram_data_t; variable result : tag_ram_data_t;
begin begin
result(0) := x.valid; result(0) := x.valid;
result(3 downto 1) := x.tv_p; result(3 downto 1) := x.tv_p;
result(tag_width+3 downto 4) := x.tag; result(tag_width+3 downto 4) := x.tag;
return result; return result;
end to_tram_data; end to_tag_ram_data;
type cache_state_t is (init, ready, flush, mem_request, mem_access, mem_wait, mem_data, upd_cache, rd_cache); type cache_state_t is (init, ready, invalidate, flush, mem_request, mem_access, mem_data, rd_cache);
signal s, sn : cache_state_t; signal s, sn : cache_state_t;
signal cache_req : std_logic;
signal cache_ack : std_logic;
signal cache_busy : std_logic; signal cache_busy : std_logic;
signal cache_hit : std_logic; signal cache_hit : std_logic;
signal tag_match : std_logic; signal tag_match : std_logic;
signal word_index_reg : unsigned(word_index_width-1 downto 0); signal cache_hit_inv : std_logic;
signal cache_index_reg : unsigned(cache_index_width-1 downto 0); signal tag_match_inv : std_logic;
signal tag_index_reg : unsigned(tag_width-1 downto 0);
signal request_addr : unsigned(addr_width-1 downto 0);
signal fill_addr : unsigned(addr_width-1 downto 0);
signal cache_index_inv : unsigned(cache_index_width-1 downto 0);
signal tag_inv : unsigned(tag_width-1 downto 0);
signal tag_reg_inv : unsigned(tag_width-1 downto 0);
signal cache_entry_in : dcache_entry_t; signal cache_entry_in : dcache_entry_t;
signal cache_entry_out : dcache_entry_t; signal cache_entry_out : dcache_entry_t;
signal cpu_dram_addr : unsigned(lg2(cache_size)-1 downto 0); signal cache_entry_out_inv : dcache_entry_t;
signal cpu_dram_dout : word_t; signal cpu_data_ram_addr : unsigned(lg2(cache_size)-1 downto 0);
signal cpu_dram_din : word_t; signal cpu_data_ram_dout : word_t;
signal cpu_data_reg : word_t; signal cpu_data_reg : word_t;
signal cpu_be_reg : unsigned(3 downto 0); signal cpu_be_reg : unsigned(3 downto 0);
signal cpu_we_reg : std_logic; signal cpu_we_reg : std_logic;
signal ctrl_dram_en : std_logic; signal ctrl_data_ram_addr : unsigned(lg2(cache_size)-1 downto 0);
signal ctrl_dram_addr : unsigned(lg2(cache_size)-1 downto 0); signal ctrl_data_ram_we : unsigned(3 downto 0);
signal ctrl_dram_din : word_t; signal cpu_data_ram_we : unsigned(3 downto 0);
signal ctrl_dram_we : unsigned(3 downto 0);
signal cpu_dram_we : unsigned(3 downto 0);
signal cpu_dram_en : std_logic;
signal cpu_en2 : std_logic;
signal cpu_we2 : std_logic; signal cpu_we2 : std_logic;
signal tram_addr_rd : unsigned(cache_index_width-1 downto 0); signal tag_ram_addr_rd : unsigned(cache_index_width-1 downto 0);
signal tram_dout : tram_data_t; signal tag_ram_dout : tag_ram_data_t;
signal tram_addr_wr : unsigned(cache_index_width-1 downto 0); signal tag_ram_dout_inv : tag_ram_data_t;
signal tram_din : tram_data_t; signal tag_ram_addr_wr : unsigned(cache_index_width-1 downto 0);
signal tram_re : std_logic; signal tag_ram_din : tag_ram_data_t;
signal tram_we : std_logic; signal tag_ram_we : std_logic;
signal ram_index_count : natural range 0 to 2**word_index_width-1; signal fill_count : natural range 0 to 2**word_index_width-1;
signal ram_index_count_rst : std_logic; signal fill_count_en : std_logic;
signal cache_index_count : natural range 0 to 2**cache_index_width-1; signal fill_count_rdy : std_logic;
signal cache_index_count_en : std_logic; signal flush_count : natural range 0 to 2**cache_index_width-1;
signal mem_index_count : natural range 0 to 2**word_index_width-1; signal flush_count_rst : std_logic;
signal mem_index_count_en : std_logic; signal flush_count_en : std_logic;
signal mem_index_count_rst : std_logic; signal flush_count_rdy : std_logic;
signal cpu_reg_en : std_logic; signal request_count : natural range 0 to 2**word_index_width-1;
signal request_count_en : std_logic;
signal request_count_rdy : std_logic;
signal was_miss : std_logic; signal was_miss : std_logic;
signal data_write : std_logic; signal invalidate_all : std_logic;
signal invalidate_ack : std_logic;
signal invalidate_en : std_logic;
signal invalidate_req : std_logic;
signal cpu_hit_we : std_logic; signal cpu_hit_we : std_logic;
signal instant_raw : std_logic; signal instant_raw : std_logic;
signal hit_cache_index : unsigned(cache_index_width-1 downto 0);
alias cpu_word_index is cpu_addr(word_index_width+1 downto 2);
alias cpu_cache_index is cpu_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias cpu_tag is cpu_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
alias fill_word_index is fill_addr(word_index_width+1 downto 2);
alias fill_cache_index is fill_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias fill_tag is fill_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
alias req_word_index is request_addr(word_index_width+1 downto 2);
alias req_cache_index is request_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias req_tag is request_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
begin begin
cache_index_inv <= ctrl.inv_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
tag_inv <= ctrl.inv_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
cpu_hit_we <= cpu_we2 and cache_hit; cpu_hit_we <= cpu_we2 and cache_hit;
cpu_index_register: fill_address_register:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if RST_I = '1' then if fill_count_en = '1' then
cache_index_reg <= (others => '0'); if ACK_I = '1' then
tag_index_reg <= (others => '0'); fill_word_index <= fill_word_index + 1;
elsif cpu_reg_en = '1' and en = '1' and instant_raw = '0' then end if;
word_index_reg <= cpu_word_index; elsif cache_busy = '0' then
cache_index_reg <= cpu_cache_index; fill_addr <= cpu_addr(addr_width-1 downto 2) & "00";
tag_index_reg <= cpu_tag;
end if; end if;
end if; end if;
end process; end process;
cpu_data_register: request_address_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if request_count_en = '1'then
if SRDY_I = '1' then
req_word_index <= req_word_index + 1;
end if;
elsif cache_busy = '0' then
request_addr <= cpu_addr(addr_width-1 downto 2) & "00";
end if;
end if;
end process;
cpu_request_register:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if RST_I = '1' then if RST_I = '1' then
cpu_we_reg <= '0'; cpu_we_reg <= '0';
elsif cpu_reg_en = '1' and en = '1' then cache_req <= '0';
elsif cpu_en = '1' then
if cache_busy = '0' then
cpu_we2 <= cpu_we;
cache_req <= '1';
cpu_data_reg <= cpu_din; cpu_data_reg <= cpu_din;
cpu_be_reg <= cpu_be; cpu_be_reg <= cpu_be;
cpu_we_reg <= cpu_we; cpu_we_reg <= cpu_we;
if cpu_we = '1' then
hit_cache_index <= cpu_cache_index;
end if; end if;
end if; end if;
end process; elsif cache_ack = '1' then
cache_req <= '0';
cpu_was_wr_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
cpu_en2 <= '0';
cpu_we2 <= '0'; cpu_we2 <= '0';
if cpu_en = '1' and en = '1' then
cpu_we2 <= cpu_we;
cpu_en2 <= '1';
cpu_dram_din <= cpu_din;
end if; end if;
end if; end if;
end process; end process;
@@ -225,25 +269,33 @@ instant_raw_logic:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
instant_raw <= cpu_hit_we and cpu_en and en and not cpu_we; instant_raw <= '0';
if cpu_word_index = fill_word_index and cpu_cache_index = hit_cache_index then
instant_raw <= cpu_hit_we and cpu_en and not cpu_we;
end if;
end if; end if;
end process; end process;
inst_tag_ram : dpram_1w1r inst_tag_ram : dpram_2w2r
GENERIC MAP ( GENERIC MAP
addr_width => tram_addr_width, (
data_width => tram_data_width addr_width => tag_ram_addr_width,
data_width => tag_ram_data_width
) )
PORT MAP ( PORT MAP
clka => CLK_I, (
clkb => CLK_I, clk_a => CLK_I,
clk_b => CLK_I,
en_a => '1', en_a => '1',
en_b => tram_re, en_b => '1',
we_a => tram_we, we_a => tag_ram_we,
addr_a => tram_addr_wr, we_b => '0',
addr_b => tram_addr_rd, addr_a => tag_ram_addr_wr,
din_a => tram_din, addr_b => tag_ram_addr_rd,
dout_b => tram_dout din_a => tag_ram_din,
din_b => tag_ram_din,
dout_a => tag_ram_dout_inv,
dout_b => tag_ram_dout
); );
gen_data_ram: gen_data_ram:
@@ -251,26 +303,45 @@ gen_data_ram:
begin begin
inst_data_ram : dpram_2w2r inst_data_ram : dpram_2w2r
GENERIC MAP ( GENERIC MAP
(
addr_width => lg2(cache_size), addr_width => lg2(cache_size),
data_width => word_t'length/4 data_width => word_t'length/4
) )
PORT MAP ( PORT MAP
(
clk_a => CLK_I, clk_a => CLK_I,
clk_b => CLK_I, clk_b => CLK_I,
en_a => ctrl_dram_en, en_a => '1',
en_b => '1', en_b => '1',
we_a => ctrl_dram_we(i), we_a => cpu_data_ram_we(i),
we_b => cpu_dram_we(i), we_b => ctrl_data_ram_we(i),
addr_a => ctrl_dram_addr, addr_a => ctrl_data_ram_addr,
addr_b => cpu_dram_addr, addr_b => cpu_data_ram_addr,
din_a => ctrl_dram_din(8*(i+1)-1 downto 8*i), din_a => cpu_data_reg(8*(i+1)-1 downto 8*i),
din_b => cpu_dram_din(8*(i+1)-1 downto 8*i), din_b => DAT_I(8*(i+1)-1 downto 8*i),
dout_a => open, dout_a => open,
dout_b => cpu_dram_dout(8*(i+1)-1 downto 8*i) dout_b => cpu_data_ram_dout(8*(i+1)-1 downto 8*i)
); );
end generate; end generate;
cache_invalidate_request:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' or ctrl.inv_all = '1' or ctrl.inv_at = '1' then
invalidate_req <= '1';
invalidate_all <= ctrl.inv_all or RST_I;
tag_reg_inv <= tag_inv;
elsif invalidate_ack = '1' then
invalidate_req <= '0';
invalidate_all <= '0';
end if;
end if;
end process;
cache_state_next: cache_state_next:
process(CLK_I) process(CLK_I)
begin begin
@@ -283,146 +354,175 @@ cache_state_next:
end if; end if;
end process; end process;
cpu_busy <= cache_busy or instant_raw; MRDY_O <= fill_count_en;
cpu_dout <= cpu_dram_dout; ADDR_O <= request_addr;
tag_match <= '1' when tag_index_reg = cache_entry_out.tag else '0'; cpu_busy <= cache_busy;
cpu_dout <= cpu_data_ram_dout;
tag_match <= '1' when fill_tag = cache_entry_out.tag else '0';
cache_hit <= tag_match and cache_entry_out.valid; cache_hit <= tag_match and cache_entry_out.valid;
tram_din <= to_tram_data(cache_entry_in); tag_match_inv <= '1' when tag_reg_inv = cache_entry_out_inv.tag else '0';
tram_addr_rd <= cpu_cache_index when was_miss = '0' else cache_index_reg; cache_hit_inv <= tag_match_inv and cache_entry_out_inv.valid;
cache_entry_out <= to_dcache_entry(tram_dout); tag_ram_din <= to_tag_ram_data(cache_entry_in);
cpu_dram_addr <= (cpu_cache_index & cpu_word_index) when (was_miss = '0' and cpu_hit_we = '0' and instant_raw = '0') else (cache_index_reg & word_index_reg); tag_ram_addr_wr <= to_unsigned(flush_count, cache_index_width) when invalidate_en = '1' else fill_cache_index;
ADDR_O <= tag_index_reg & cache_index_reg & to_unsigned(mem_index_count, word_index_width) & "00"; tag_ram_addr_rd <= cpu_cache_index when (was_miss = '0' and instant_raw = '0') else fill_cache_index;
ctrl_dram_addr <= cache_index_reg & to_unsigned(ram_index_count, word_index_width);
ctrl_dram_din <= DAT_I; cache_entry_out <= to_dcache_entry(tag_ram_dout);
ctrl_dram_we <= (others => '1'); cache_entry_out_inv <= to_dcache_entry(tag_ram_dout_inv);
ctrl_dram_en <= data_write and ACK_I;
cpu_dram_we <= cpu_be_reg when (cpu_hit_we = '1') else (others => '0'); cpu_data_ram_addr <= (cpu_cache_index & cpu_word_index) when (was_miss = '0' and instant_raw = '0' and fill_count_en = '0') else (fill_cache_index & fill_word_index);
ctrl_data_ram_addr <= fill_cache_index & fill_word_index;
ctrl_data_ram_we <= (others => fill_count_en and ACK_I);
cpu_data_ram_we <= cpu_be_reg when (cpu_hit_we = '1') else (others => '0');
cache_state: cache_state:
process(s, instant_raw, cache_hit, cache_index_count, ram_index_count, mem_index_count, cache_index_reg, ACK_I, tag_index_reg, cpu_en, SRDY_I, cpu_en2, cpu_we_reg) process(s, cache_req, instant_raw, cache_hit, cache_hit_inv, flush_count_rdy, fill_count_rdy, request_count_rdy, fill_tag, SRDY_I, cpu_we_reg, invalidate_req, invalidate_all)
begin begin
cpu_reg_en <= '0'; cache_busy <= cache_req;
cache_busy <= '1'; cache_ack <= '0';
tram_we <= '0'; tag_ram_we <= '0';
cache_index_count_en <= '0'; flush_count_en <= '0';
ram_index_count_rst <= '0'; flush_count_rst <= '0';
mem_index_count_en <= '0'; invalidate_en <= '0';
mem_index_count_rst <= '0'; request_count_en <= '0';
fill_count_en <= '0';
CYC_O <= '0'; CYC_O <= '0';
STB_O <= '0'; STB_O <= '0';
tram_re <= '0';
was_miss <= '0'; was_miss <= '0';
data_write <= '0'; invalidate_ack <= '0';
tram_addr_wr <= to_unsigned(cache_index_count, cache_index_width);
cache_entry_in.tv_p <= (others => '0'); cache_entry_in.tv_p <= (others => '0');
cache_entry_in.tag <= tag_index_reg; cache_entry_in.tag <= fill_tag;
cache_entry_in.valid <= '0'; cache_entry_in.valid <= '0';
sn <= s; sn <= s;
case s is case s is
when init => when init =>
sn <= flush; sn <= ready;
when ready => when ready =>
cache_busy <= '0'; if invalidate_req = '1' then
cpu_reg_en <= '1'; sn <= invalidate;
tram_re <= cpu_en; invalidate_en <= '1';
if cpu_en2 = '1' then else
if cache_req = '1' then
if cache_hit = '0' and cpu_we_reg = '0' then if cache_hit = '0' and cpu_we_reg = '0' then
sn <= mem_request; sn <= mem_request;
cpu_reg_en <= '0';
cache_busy <= '1';
CYC_O <= '1'; CYC_O <= '1';
else
cache_busy <= instant_raw;
cache_ack <= not instant_raw;
end if; end if;
end if; end if;
when flush => end if;
cache_index_count_en <= '1'; when invalidate =>
tram_addr_wr <= to_unsigned(cache_index_count, cache_index_width); sn <= rd_cache;
tram_we <= '1'; invalidate_en <= '1';
invalidate_ack <= '1';
if invalidate_all = '1' then
sn <= flush;
flush_count_rst <= '1';
elsif cache_hit_inv = '1' then
tag_ram_we <= '1';
cache_entry_in.valid <= '0'; cache_entry_in.valid <= '0';
cache_entry_in.tag <= (others => '0'); cache_entry_in.tag <= (others => '0');
if cache_index_count = 0 then sn <= rd_cache;
sn <= ready;
if cpu_en = '1' then
cpu_reg_en <= '1';
tram_re <= '1';
end if; end if;
when flush =>
flush_count_en <= '1';
invalidate_en <= '1';
tag_ram_we <= '1';
cache_entry_in.valid <= '0';
cache_entry_in.tag <= (others => '0');
if flush_count_rdy = '1' then
tag_ram_we <= '0';
sn <= rd_cache;
end if; end if;
when mem_request => when mem_request =>
ram_index_count_rst <= '1';
mem_index_count_rst <= '1';
CYC_O <= '1'; CYC_O <= '1';
if SRDY_I = '1' then if SRDY_I = '1' then
sn <= mem_access; sn <= mem_access;
end if; end if;
when mem_access => when mem_access =>
data_write <= '1'; fill_count_en <= '1';
mem_index_count_en <= '1'; request_count_en <= '1';
CYC_O <= '1'; CYC_O <= '1';
STB_O <= '1'; STB_O <= '1';
if mem_index_count = 2**word_index_width-1 then if request_count_rdy = '1' then
if SRDY_I = '1' then STB_O <= '0';
sn <= mem_data; sn <= mem_data;
end if; end if;
end if;
when mem_data => when mem_data =>
CYC_O <= '1'; CYC_O <= '1';
data_write <= '1'; fill_count_en <= '1';
if ram_index_count = 2**word_index_width-1 then if fill_count_rdy = '1' then
if ACK_I = '1' then tag_ram_we <= '1';
sn <= upd_cache;
end if;
end if;
when upd_cache =>
tram_addr_wr <= cache_index_reg;
tram_we <= '1';
cache_entry_in.valid <= '1'; cache_entry_in.valid <= '1';
sn <= rd_cache; sn <= rd_cache;
end if;
when rd_cache => when rd_cache =>
tram_re <= '1';
was_miss <= '1'; was_miss <= '1';
sn <= ready; sn <= ready;
when others => when others =>
sn <= ready; sn <= ready;
end case; end case;
end process; end process;
cache_index_counter: flush_counter:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if cache_index_count_en = '0' then if ctrl.inv_at = '1' then
cache_index_count <= 2**cache_index_width-1; flush_count <= to_integer(cache_index_inv);
elsif cache_index_count /= 0 then elsif flush_count_rst = '1' then
cache_index_count <= cache_index_count - 1; flush_count_rdy <= '0';
end if; flush_count <= 2**cache_index_width-1;
end if; elsif flush_count_en = '1' then
end process; if flush_count /= 0 then
flush_count <= flush_count - 1;
ram_index_counter: else
process(CLK_I) flush_count_rdy <= '1';
begin
if rising_edge(CLK_I) then
if ram_index_count_rst = '1' then
ram_index_count <= 0;
elsif data_write = '1' and ACK_I = '1' then
if ram_index_count /= 2**word_index_width-1 then
ram_index_count <= ram_index_count + 1;
end if; end if;
end if; end if;
end if; end if;
end process; end process;
mem_index_counter: request_counter:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if mem_index_count_rst = '1' then if request_count_en = '0' then
mem_index_count <= 0; request_count_rdy <= '0';
elsif mem_index_count_en = '1' and SRDY_I = '1' then request_count <= 2**word_index_width-1;
if mem_index_count /= 2**word_index_width-1 then else
mem_index_count <= mem_index_count + 1; if SRDY_I = '1' then
if request_count /= 0 then
request_count <= request_count - 1;
else
request_count_rdy <= '1';
end if;
end if;
end if;
end if;
end process;
fill_counter:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if fill_count_en = '0' then
fill_count_rdy <= '0';
fill_count <= 2**word_index_width-1;
else
if ACK_I = '1' then
if fill_count /= 0 then
fill_count <= fill_count - 1;
else
fill_count_rdy <= '1';
end if;
end if; end if;
end if; end if;
end if; end if;
+264 -130
View File
@@ -1,7 +1,29 @@
--------------------------------------------------------------------------
-- Project: JIPS, a portable 32-bit RISC CPU written in VHDL
-- This file: JIPS top file
--
-- Copyright (C) 2008 J. Ahrensfeld
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
--------------------------------------------------------------------------
LIBRARY IEEE; LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL; USE IEEE.NUMERIC_STD.ALL;
use IEEE.MATH_REAL.ALL;
library work; library work;
use work.mips_types.all; use work.mips_types.all;
@@ -18,11 +40,12 @@ ENTITY icache IS
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
MRDY_O : out STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out word_t;
DAT_I : in word_t; DAT_I : in word_t;
STB_O : out STD_LOGIC; STB_O : out STD_LOGIC;
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
en : in STD_LOGIC; ctrl : in cache_ctrl_t;
cpu_en : in STD_LOGIC; cpu_en : in STD_LOGIC;
cpu_addr : in word_t; cpu_addr : in word_t;
cpu_dout : out word_t; cpu_dout : out word_t;
@@ -51,20 +74,33 @@ COMPONENT dpram_1w1r
); );
END COMPONENT; END COMPONENT;
function lg2(x : natural) return natural is COMPONENT dpram_2w2r is
begin GENERIC
return natural(ceil(log2(real(x)))); (
end lg2; addr_width : integer := 3;
data_width : integer := 8
function po2(x : natural) return natural is );
begin PORT
(
return 2**lg2(x); clk_a : in STD_LOGIC;
end po2; clk_b : in STD_LOGIC;
en_a : in STD_LOGIC;
en_b : in STD_LOGIC;
we_a : in STD_LOGIC;
we_b : in STD_LOGIC;
addr_a : in unsigned (addr_width-1 downto 0);
addr_b : in unsigned (addr_width-1 downto 0);
din_a : in unsigned (data_width-1 downto 0);
din_b : in unsigned (data_width-1 downto 0);
dout_a : out unsigned (data_width-1 downto 0);
dout_b : out unsigned (data_width-1 downto 0)
);
END COMPONENT;
constant addr_width : natural := 32;
constant word_index_width : natural := lg2(line_size); constant word_index_width : natural := lg2(line_size);
constant cache_index_width : natural := lg2(cache_size) - word_index_width; constant cache_index_width : natural := lg2(cache_size) - word_index_width;
constant tag_width : natural := 32 - word_index_width - cache_index_width - 2; constant tag_width : natural := addr_width - word_index_width - cache_index_width - 2;
constant tag_parity_width : natural := 3; constant tag_parity_width : natural := 3;
constant tag_ram_data_width : natural := 1 + tag_parity_width + tag_width; constant tag_ram_data_width : natural := 1 + tag_parity_width + tag_width;
constant tag_ram_addr_width : natural := cache_index_width; constant tag_ram_addr_width : natural := cache_index_width;
@@ -77,10 +113,6 @@ END COMPONENT;
tag : unsigned(tag_width-1 downto 0); tag : unsigned(tag_width-1 downto 0);
end record; end record;
alias cpu_word_index is cpu_addr(word_index_width+1 downto 2);
alias cpu_cache_index is cpu_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias cpu_tag is cpu_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
function to_icache_entry(x : tag_ram_data_t) return icache_entry_t is function to_icache_entry(x : tag_ram_data_t) return icache_entry_t is
variable result : icache_entry_t; variable result : icache_entry_t;
begin begin
@@ -101,88 +133,168 @@ END COMPONENT;
return result; return result;
end to_tag_ram_data; end to_tag_ram_data;
type cache_state_t is (init, ready, flush, mem_request, mem_access, mem_wait, mem_data, upd_cache, rd_cache); type cache_state_t is (init, ready, invalidate, flush, mem_request, mem_access, mem_data, rd_cache, upd_cache);
signal s, sn : cache_state_t; signal s, sn : cache_state_t;
signal cache_req : std_logic;
signal cache_ack : std_logic;
signal cache_busy : std_logic; signal cache_busy : std_logic;
signal cache_miss : std_logic; signal cache_miss : std_logic;
signal tag_match : std_logic; signal tag_match : std_logic;
signal word_index_reg : unsigned(word_index_width-1 downto 0); signal cache_miss_inv : std_logic;
signal cache_index_reg : unsigned(cache_index_width-1 downto 0); signal tag_match_inv : std_logic;
signal tag_index_reg : unsigned(tag_width-1 downto 0); signal request_addr : unsigned(addr_width-1 downto 0);
signal fill_addr : unsigned(addr_width-1 downto 0);
signal cache_index_inv : unsigned(cache_index_width-1 downto 0);
signal tag_inv : unsigned(tag_width-1 downto 0);
signal tag_reg_inv : unsigned(tag_width-1 downto 0);
signal cache_entry_in : icache_entry_t; signal cache_entry_in : icache_entry_t;
signal cache_entry_out : icache_entry_t; signal cache_entry_out : icache_entry_t;
signal cache_entry_out_inv : icache_entry_t;
signal data_ram_addr_rd : unsigned(lg2(cache_size)-1 downto 0); signal data_ram_addr_rd : unsigned(lg2(cache_size)-1 downto 0);
signal data_ram_data_rd : word_t; signal data_ram_data_rd : word_t;
signal data_ram_addr_wr : unsigned(lg2(cache_size)-1 downto 0); signal data_ram_addr_wr : unsigned(lg2(cache_size)-1 downto 0);
signal data_ram_data_wr : word_t; signal data_ram_data_wr : word_t;
signal data_ram_we : std_logic; signal data_ram_we : std_logic;
signal data_ram_re : std_logic;
signal tag_ram_addr_rd : unsigned(cache_index_width-1 downto 0); signal tag_ram_addr_rd : unsigned(cache_index_width-1 downto 0);
signal tag_ram_data_rd : tag_ram_data_t; signal tag_ram_data_rd : tag_ram_data_t;
signal tag_ram_data_rd_inv : tag_ram_data_t;
signal tag_ram_addr_wr : unsigned(cache_index_width-1 downto 0); signal tag_ram_addr_wr : unsigned(cache_index_width-1 downto 0);
signal tag_ram_data_wr : tag_ram_data_t; signal tag_ram_data_wr : tag_ram_data_t;
signal tag_ram_re : std_logic;
signal tag_ram_we : std_logic; signal tag_ram_we : std_logic;
signal ram_index_count : natural range 0 to 2**word_index_width-1; signal fill_count : natural range 0 to 2**word_index_width-1;
signal ram_index_count_rst : std_logic; signal fill_count_en : std_logic;
signal cache_index_count : natural range 0 to 2**cache_index_width-1; signal fill_count_rdy : std_logic;
signal cache_index_count_en : std_logic; signal flush_count : natural range 0 to 2**cache_index_width-1;
signal mem_index_count : natural range 0 to 2**word_index_width-1; signal flush_count_rst : std_logic;
signal mem_index_count_en : std_logic; signal flush_count_en : std_logic;
signal mem_index_count_rst : std_logic; signal flush_count_rdy : std_logic;
signal cpu_reg_en : std_logic; signal request_count : natural range 0 to 2**word_index_width-1;
signal request_count_en : std_logic;
signal request_count_rdy : std_logic;
signal ram_read_en : std_logic;
signal was_miss : std_logic; signal was_miss : std_logic;
signal data_write : std_logic; signal invalidate_all : std_logic;
signal invalidate_ack : std_logic;
signal invalidate_en : std_logic;
signal invalidate_req : std_logic;
alias cpu_word_index is cpu_addr(word_index_width+1 downto 2);
alias cpu_cache_index is cpu_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias cpu_tag is cpu_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
alias fill_word_index is fill_addr(word_index_width+1 downto 2);
alias fill_cache_index is fill_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias fill_tag is fill_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
alias req_word_index is request_addr(word_index_width+1 downto 2);
alias req_cache_index is request_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
alias req_tag is request_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
begin begin
ram_read_en <= cpu_en or was_miss;
cache_index_inv <= ctrl.inv_addr(cache_index_width+word_index_width+1 downto word_index_width+2);
tag_inv <= ctrl.inv_addr(tag_width+cache_index_width+word_index_width+1 downto cache_index_width+word_index_width+2);
cpu_index_reg:
fill_address_register:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if RST_I = '1' then if fill_count_en = '1' then
cache_index_reg <= (others => '0'); if ACK_I = '1' then
tag_index_reg <= (others => '0'); fill_word_index <= fill_word_index + 1;
elsif cpu_reg_en = '1' then end if;
word_index_reg <= cpu_word_index; elsif cache_busy = '0' then
cache_index_reg <= cpu_cache_index; fill_addr <= cpu_addr(addr_width-1 downto 2) & "00";
tag_index_reg <= cpu_tag;
end if; end if;
end if; end if;
end process; end process;
inst_tag_ram : dpram_1w1r request_address_register:
GENERIC MAP ( process(CLK_I)
begin
if rising_edge(CLK_I) then
if request_count_en = '1'then
if SRDY_I = '1' then
req_word_index <= req_word_index + 1;
end if;
elsif cache_busy = '0' then
request_addr <= cpu_addr(addr_width-1 downto 2) & "00";
end if;
end if;
end process;
cpu_request_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
cache_req <= '0';
elsif cpu_en = '1' then
if cache_busy = '0' then
cache_req <= '1';
end if;
elsif cache_ack = '1' then
cache_req <= '0';
end if;
end if;
end process;
cache_invalidate_request:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' or ctrl.inv_all = '1' or ctrl.inv_at = '1' then
invalidate_req <= '1';
invalidate_all <= ctrl.inv_all or RST_I;
tag_reg_inv <= tag_inv;
elsif invalidate_ack = '1' then
invalidate_req <= '0';
invalidate_all <= '0';
end if;
end if;
end process;
inst_tag_ram : dpram_2w2r
GENERIC MAP
(
addr_width => tag_ram_addr_width, addr_width => tag_ram_addr_width,
data_width => tag_ram_data_width data_width => tag_ram_data_width
) )
PORT MAP ( PORT MAP
clka => CLK_I, (
clkb => CLK_I, clk_a => CLK_I,
clk_b => CLK_I,
en_a => '1', en_a => '1',
en_b => tag_ram_re, en_b => ram_read_en,
we_a => tag_ram_we, we_a => tag_ram_we,
we_b => '0',
addr_a => tag_ram_addr_wr, addr_a => tag_ram_addr_wr,
addr_b => tag_ram_addr_rd, addr_b => tag_ram_addr_rd,
din_a => tag_ram_data_wr, din_a => tag_ram_data_wr,
din_b => tag_ram_data_wr,
dout_a => tag_ram_data_rd_inv,
dout_b => tag_ram_data_rd dout_b => tag_ram_data_rd
); );
inst_data_ram : dpram_1w1r inst_data_ram : dpram_1w1r
GENERIC MAP ( GENERIC MAP
(
addr_width => lg2(cache_size), addr_width => lg2(cache_size),
data_width => word_t'length data_width => word_t'length
) )
PORT MAP ( PORT MAP
(
clka => CLK_I, clka => CLK_I,
clkb => CLK_I, clkb => CLK_I,
en_a => '1', en_a => '1',
en_b => data_ram_re, en_b => ram_read_en,
we_a => data_ram_we, we_a => data_ram_we,
addr_a => data_ram_addr_wr, addr_a => data_ram_addr_wr,
addr_b => data_ram_addr_rd, addr_b => data_ram_addr_rd,
@@ -190,7 +302,6 @@ inst_data_ram : dpram_1w1r
dout_b => data_ram_data_rd dout_b => data_ram_data_rd
); );
cache_state_next: cache_state_next:
process(CLK_I) process(CLK_I)
begin begin
@@ -203,149 +314,172 @@ cache_state_next:
end if; end if;
end process; end process;
MRDY_O <= fill_count_en;
ADDR_O <= fill_tag & fill_cache_index & req_word_index & "00";
cpu_busy <= cache_busy; cpu_busy <= cache_busy;
cpu_dout <= data_ram_data_rd; cpu_dout <= data_ram_data_rd;
tag_match <= '1' when tag_index_reg = cache_entry_out.tag else '0';
cache_miss <= not (tag_match and cache_entry_out.valid);
tag_ram_data_wr <= to_tag_ram_data(cache_entry_in);
tag_ram_addr_rd <= cpu_cache_index when was_miss = '0' else cache_index_reg;
cache_entry_out <= to_icache_entry(tag_ram_data_rd); cache_entry_out <= to_icache_entry(tag_ram_data_rd);
data_ram_addr_rd <= (cpu_cache_index & cpu_word_index) when was_miss = '0' else (cache_index_reg & word_index_reg); tag_match <= '1' when fill_tag = cache_entry_out.tag else '0';
ADDR_O <= tag_index_reg & cache_index_reg & to_unsigned(mem_index_count, word_index_width) & "00"; cache_miss <= not (tag_match and cache_entry_out.valid);
data_ram_addr_wr <= cache_index_reg & to_unsigned(ram_index_count, word_index_width);
cache_entry_out_inv <= to_icache_entry(tag_ram_data_rd_inv);
tag_match_inv <= '1' when tag_reg_inv = cache_entry_out_inv.tag else '0';
cache_miss_inv <= not (tag_match_inv and cache_entry_out_inv.valid);
tag_ram_data_wr <= to_tag_ram_data(cache_entry_in);
tag_ram_addr_wr <= to_unsigned(flush_count, cache_index_width) when invalidate_en = '1' else fill_cache_index;
tag_ram_addr_rd <= cpu_cache_index when was_miss = '0' else fill_cache_index;
data_ram_addr_rd <= (cpu_cache_index & cpu_word_index) when was_miss = '0' else (fill_cache_index & fill_word_index);
data_ram_addr_wr <= fill_cache_index & fill_word_index;
data_ram_data_wr <= DAT_I; data_ram_data_wr <= DAT_I;
data_ram_we <= data_write and ACK_I; data_ram_we <= fill_count_en and ACK_I;
cache_state: cache_state:
process(s, cache_miss, cache_index_count, ram_index_count, mem_index_count, cache_index_reg, ACK_I, tag_index_reg, cpu_en, SRDY_I, en) process(s, cache_req, cache_miss, cache_miss_inv, flush_count_rdy, fill_count_rdy, request_count_rdy, fill_tag, SRDY_I, invalidate_req, invalidate_all)
begin begin
cpu_reg_en <= '0'; cache_busy <= cache_req;
cache_busy <= '1'; cache_ack <= '0';
tag_ram_we <= '0'; tag_ram_we <= '0';
cache_index_count_en <= '0'; flush_count_en <= '0';
ram_index_count_rst <= '0'; flush_count_rst <= '0';
mem_index_count_en <= '0'; invalidate_en <= '0';
mem_index_count_rst <= '0'; request_count_en <= '0';
fill_count_en <= '0';
CYC_O <= '0'; CYC_O <= '0';
STB_O <= '0'; STB_O <= '0';
data_ram_re <= '0';
tag_ram_re <= '0';
was_miss <= '0'; was_miss <= '0';
data_write <= '0'; invalidate_ack <= '0';
tag_ram_addr_wr <= to_unsigned(cache_index_count, cache_index_width);
cache_entry_in.tv_p <= (others => '0'); cache_entry_in.tv_p <= (others => '0');
cache_entry_in.tag <= tag_index_reg; cache_entry_in.tag <= fill_tag;
cache_entry_in.valid <= '0'; cache_entry_in.valid <= '0';
sn <= s; sn <= s;
case s is case s is
when init => when init =>
sn <= flush; sn <= ready;
when ready => when ready =>
if en = '1' then if invalidate_req = '1' then
cache_busy <= '0'; sn <= invalidate;
invalidate_en <= '1';
elsif cache_req = '1' then
if cache_miss = '1' then if cache_miss = '1' then
sn <= mem_request; sn <= mem_request;
cpu_reg_en <= '0';
cache_busy <= '1';
CYC_O <= '1'; CYC_O <= '1';
elsif cpu_en = '1' then else
cpu_reg_en <= '1'; cache_busy <= '0';
data_ram_re <= '1'; cache_ack <= '1';
tag_ram_re <= '1';
end if; end if;
end if; end if;
when flush => when invalidate =>
cache_index_count_en <= '1'; sn <= rd_cache;
tag_ram_addr_wr <= to_unsigned(cache_index_count, cache_index_width); invalidate_en <= '1';
invalidate_ack <= '1';
if invalidate_all = '1' then
sn <= flush;
flush_count_rst <= '1';
elsif cache_miss_inv = '0' then
tag_ram_we <= '1'; tag_ram_we <= '1';
cache_entry_in.valid <= '0'; cache_entry_in.valid <= '0';
cache_entry_in.tag <= (others => '0'); cache_entry_in.tag <= (others => '0');
if cache_index_count = 0 then sn <= rd_cache;
sn <= ready;
if cpu_en = '1' then
cpu_reg_en <= '1';
data_ram_re <= '1';
tag_ram_re <= '1';
end if; end if;
when flush =>
flush_count_en <= '1';
invalidate_en <= '1';
tag_ram_we <= '1';
cache_entry_in.valid <= '0';
cache_entry_in.tag <= (others => '0');
if flush_count_rdy = '1' then
tag_ram_we <= '0';
sn <= rd_cache;
end if; end if;
when mem_request => when mem_request =>
ram_index_count_rst <= '1';
mem_index_count_rst <= '1';
CYC_O <= '1'; CYC_O <= '1';
if SRDY_I = '1' then if SRDY_I = '1' then
sn <= mem_access; sn <= mem_access;
end if; end if;
when mem_access => when mem_access =>
mem_index_count_en <= '1'; request_count_en <= '1';
data_write <= '1'; fill_count_en <= '1';
CYC_O <= '1'; CYC_O <= '1';
STB_O <= '1'; STB_O <= '1';
if mem_index_count = 2**word_index_width-1 then if request_count_rdy = '1' then
if SRDY_I = '1' then STB_O <= '0';
sn <= mem_data; sn <= mem_data;
end if; end if;
end if;
when mem_data => when mem_data =>
CYC_O <= '1'; CYC_O <= '1';
data_write <= '1'; fill_count_en <= '1';
if ram_index_count = 2**word_index_width-1 then if fill_count_rdy = '1' then
if ACK_I = '1' then
sn <= upd_cache;
end if;
end if;
when upd_cache =>
tag_ram_addr_wr <= cache_index_reg;
tag_ram_we <= '1'; tag_ram_we <= '1';
cache_entry_in.valid <= '1'; cache_entry_in.valid <= '1';
sn <= rd_cache; sn <= rd_cache;
end if;
when rd_cache => when rd_cache =>
tag_ram_re <= '1';
data_ram_re <= '1';
was_miss <= '1'; was_miss <= '1';
sn <= ready; sn <= ready;
when others => when others =>
sn <= ready; sn <= ready;
end case; end case;
end process; end process;
cache_index_counter: flush_counter:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if cache_index_count_en = '0' then if ctrl.inv_at = '1' then
cache_index_count <= 2**cache_index_width-1; flush_count <= to_integer(cache_index_inv);
elsif cache_index_count /= 0 then elsif flush_count_rst = '1' then
cache_index_count <= cache_index_count - 1; flush_count_rdy <= '0';
end if; flush_count <= 2**cache_index_width-1;
end if; elsif flush_count_en = '1' then
end process; if flush_count /= 0 then
flush_count <= flush_count - 1;
ram_index_counter: else
process(CLK_I) flush_count_rdy <= '1';
begin
if rising_edge(CLK_I) then
if ram_index_count_rst = '1' then
ram_index_count <= 0;
elsif data_write = '1' and ACK_I = '1' then
if ram_index_count /= 2**word_index_width-1 then
ram_index_count <= ram_index_count + 1;
end if; end if;
end if; end if;
end if; end if;
end process; end process;
mem_index_counter: request_counter:
process(CLK_I) process(CLK_I)
begin begin
if rising_edge(CLK_I) then if rising_edge(CLK_I) then
if mem_index_count_rst = '1' then if request_count_en = '0' then
mem_index_count <= 0; request_count_rdy <= '0';
elsif mem_index_count_en = '1' and SRDY_I = '1' then request_count <= 2**word_index_width-1;
if mem_index_count /= 2**word_index_width-1 then else
mem_index_count <= mem_index_count + 1; if SRDY_I = '1' then
if request_count /= 0 then
request_count <= request_count - 1;
else
request_count_rdy <= '1';
end if;
end if;
end if;
end if;
end process;
fill_counter:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if fill_count_en = '0' then
fill_count_rdy <= '0';
fill_count <= 2**word_index_width-1;
else
if ACK_I = '1' then
if fill_count /= 0 then
fill_count <= fill_count - 1;
else
fill_count_rdy <= '1';
end if;
end if; end if;
end if; end if;
end if; end if;
+107 -51
View File
@@ -32,7 +32,9 @@ entity biu is
Generic Generic
( (
icache_size : natural := 2048; -- words icache_size : natural := 2048; -- words
dcache_size : natural := 2048 -- words icache_line : natural := 8; -- words
dcache_size : natural := 2048; -- words
dcache_line : natural := 8 -- words
); );
Port Port
( (
@@ -40,14 +42,16 @@ entity biu is
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out unsigned(31 downto 0);
DAT_I : in word_t; DAT_I : in unsigned(31 downto 0);
DAT_O : out word_t; DAT_O : out unsigned(31 downto 0);
WE_O : out STD_LOGIC; WE_O : out STD_LOGIC;
SEL_O : out unsigned(3 downto 0); SEL_O : out unsigned(3 downto 0);
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
STB_O : out STD_LOGIC; STB_O : out STD_LOGIC;
MRDY_O : out STD_LOGIC; MRDY_O : out STD_LOGIC;
cop0_ctrl_in : in cop0_ctrl_out_t;
cpu_clk : in STD_LOGIC;
cpu_imem_err : out STD_LOGIC; cpu_imem_err : out STD_LOGIC;
cpu_imem_rdy : out STD_LOGIC; cpu_imem_rdy : out STD_LOGIC;
cpu_imem_en : in STD_LOGIC; cpu_imem_en : in STD_LOGIC;
@@ -78,11 +82,12 @@ architecture behavior of biu is
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
MRDY_O : out STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out word_t;
DAT_I : in word_t; DAT_I : in word_t;
STB_O : out STD_LOGIC; STB_O : out STD_LOGIC;
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
en : in STD_LOGIC; ctrl : in cache_ctrl_t;
cpu_en : in STD_LOGIC; cpu_en : in STD_LOGIC;
cpu_addr : in word_t; cpu_addr : in word_t;
cpu_dout : out word_t; cpu_dout : out word_t;
@@ -102,11 +107,12 @@ architecture behavior of biu is
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
MRDY_O : out STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out word_t;
DAT_I : in word_t; DAT_I : in word_t;
STB_O : out STD_LOGIC; STB_O : out STD_LOGIC;
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
en : in STD_LOGIC; ctrl : in cache_ctrl_t;
cpu_en : in STD_LOGIC; cpu_en : in STD_LOGIC;
cpu_we : in STD_LOGIC; cpu_we : in STD_LOGIC;
cpu_be : in unsigned(3 downto 0); cpu_be : in unsigned(3 downto 0);
@@ -136,6 +142,8 @@ architecture behavior of biu is
signal CYC_O_dmem_wr : std_logic; signal CYC_O_dmem_wr : std_logic;
signal SRDY_I_icache : std_logic; signal SRDY_I_icache : std_logic;
signal SRDY_I_dcache : std_logic; signal SRDY_I_dcache : std_logic;
signal MRDY_O_icache : std_logic;
signal MRDY_O_dcache : std_logic;
signal ADDR_O_icache : word_t; signal ADDR_O_icache : word_t;
signal ADDR_O_dcache : word_t; signal ADDR_O_dcache : word_t;
signal ADDR_O_dmem_rd : word_t; signal ADDR_O_dmem_rd : word_t;
@@ -147,9 +155,13 @@ architecture behavior of biu is
signal DAT_I_dmem_rd : word_t; signal DAT_I_dmem_rd : word_t;
signal DAT_O_dmem_wr : word_t; signal DAT_O_dmem_wr : word_t;
signal SEL_O_dmem_wr : unsigned(3 downto 0); signal SEL_O_dmem_wr : unsigned(3 downto 0);
signal SEL_O_dmem_rd : unsigned(3 downto 0);
signal dcached : std_logic; signal dcached : std_logic;
signal dcache_en2 : std_logic;
signal dcache_en : std_logic; signal dcache_en : std_logic;
signal uncached_access : std_logic; signal uncached_access : std_logic;
signal ACK : std_logic;
signal DAT : unsigned(31 downto 0);
type timeout_cnt_t is range 0 to 1E5-1; type timeout_cnt_t is range 0 to 1E5-1;
signal bus_timeout_cnt : timeout_cnt_t; signal bus_timeout_cnt : timeout_cnt_t;
@@ -163,6 +175,13 @@ architecture behavior of biu is
signal bout_fifo_empty : std_logic; signal bout_fifo_empty : std_logic;
signal bout_rdy : std_logic; signal bout_rdy : std_logic;
signal bin_fifo_din : unsigned(31 downto 0);
signal bin_fifo_dout : unsigned(31 downto 0);
signal bin_fifo_re : std_logic;
signal bin_fifo_we : std_logic;
signal bin_fifo_full : std_logic;
signal bin_fifo_empty : std_logic;
alias bout_fifo_addr_in is bout_fifo_din(31 downto 0); alias bout_fifo_addr_in is bout_fifo_din(31 downto 0);
alias bout_fifo_data_in is bout_fifo_din(63 downto 32); alias bout_fifo_data_in is bout_fifo_din(63 downto 32);
alias bout_fifo_sel_in is bout_fifo_din(67 downto 64); alias bout_fifo_sel_in is bout_fifo_din(67 downto 64);
@@ -178,7 +197,6 @@ architecture behavior of biu is
signal write_fifo_we : std_logic; signal write_fifo_we : std_logic;
signal write_fifo_full : std_logic; signal write_fifo_full : std_logic;
signal write_fifo_empty : std_logic; signal write_fifo_empty : std_logic;
signal write_busy : std_logic;
alias write_fifo_addr_in is write_fifo_din(31 downto 0); alias write_fifo_addr_in is write_fifo_din(31 downto 0);
alias write_fifo_data_in is write_fifo_din(63 downto 32); alias write_fifo_data_in is write_fifo_din(63 downto 32);
@@ -191,13 +209,10 @@ architecture behavior of biu is
begin begin
MRDY_O <= '1';
read_cyc_register: read_cyc_register:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
if RST_I = '1' then if RST_I = '1' then
read_cycle <= '0'; read_cycle <= '0';
else else
@@ -208,6 +223,7 @@ read_cyc_register:
end if; end if;
end process; end process;
MRDY_O <= not bin_fifo_full;
CYC_O <= not bout_fifo_empty or read_cycle; CYC_O <= not bout_fifo_empty or read_cycle;
STB_O <= not bout_fifo_empty; STB_O <= not bout_fifo_empty;
ADDR_O <= bout_fifo_addr_out; ADDR_O <= bout_fifo_addr_out;
@@ -216,26 +232,27 @@ read_cyc_register:
WE_O <= bout_fifo_we_out; WE_O <= bout_fifo_we_out;
cpu_imem_rdy <= not icache_busy after 4.5 ns; cpu_imem_rdy <= not icache_busy after 4.5 ns;
busy <= CYC_O_dmem_rd or dcache_busy or (write_busy); busy <= CYC_O_dmem_rd or dcache_busy or (write_fifo_full);
cpu_dmem_rdy <= not busy after 4.5 ns; cpu_dmem_rdy <= not busy after 4.5 ns;
inst_icache : icache inst_icache : icache
GENERIC MAP GENERIC MAP
( (
cache_size => icache_size, -- words cache_size => icache_size, -- words
line_size => 8 line_size => icache_line -- words
) )
PORT MAP PORT MAP
( (
CLK_I => CLK_I, CLK_I => cpu_clk,
RST_I => RST_I, RST_I => RST_I,
STB_O => STB_O_icache, STB_O => STB_O_icache,
CYC_O => CYC_O_icache, CYC_O => CYC_O_icache,
ADDR_O => ADDR_O_icache, ADDR_O => ADDR_O_icache,
DAT_I => DAT_I, MRDY_O => MRDY_O_icache,
ACK_I => ACK_I, DAT_I => DAT,
ACK_I => ACK,
SRDY_I => SRDY_I_icache, SRDY_I => SRDY_I_icache,
en => '1', ctrl => cop0_ctrl_in.icache,
cpu_en => cpu_imem_en, cpu_en => cpu_imem_en,
cpu_addr => cpu_imem_addr, cpu_addr => cpu_imem_addr,
cpu_dout => cpu_imem_din, cpu_dout => cpu_imem_din,
@@ -248,19 +265,20 @@ inst_dcache : dcache
GENERIC MAP GENERIC MAP
( (
cache_size => dcache_size, -- words cache_size => dcache_size, -- words
line_size => 8 line_size => dcache_line -- words
) )
PORT MAP PORT MAP
( (
CLK_I => CLK_I, CLK_I => cpu_clk,
RST_I => RST_I, RST_I => RST_I,
CYC_O => CYC_O_dcache, CYC_O => CYC_O_dcache,
STB_O => STB_O_dcache, STB_O => STB_O_dcache,
ADDR_O => ADDR_O_dcache, ADDR_O => ADDR_O_dcache,
DAT_I => DAT_I, MRDY_O => MRDY_O_dcache,
ACK_I => ACK_I, DAT_I => DAT,
ACK_I => ACK,
SRDY_I => SRDY_I_dcache, SRDY_I => SRDY_I_dcache,
en => dcached, ctrl => cop0_ctrl_in.dcache,
cpu_en => dcache_en, cpu_en => dcache_en,
cpu_we => cpu_dmem_we, cpu_we => cpu_dmem_we,
cpu_be => cpu_dmem_be, cpu_be => cpu_dmem_be,
@@ -272,21 +290,52 @@ inst_dcache : dcache
SRDY_I_dcache <= bout_rdy and dcache_mem_gnt; SRDY_I_dcache <= bout_rdy and dcache_mem_gnt;
dcached <= '1' when cpu_dmem_addr(31 downto 28) /= X"A" else '0'; dcached <= '1' when cpu_dmem_addr(31 downto 29) /= "101" else '0';
cpu_dmem_din <= dcache_dout when uncached_access = '0' else DAT_I_dmem_rd; cpu_dmem_din <= dcache_dout when uncached_access = '0' else DAT_I_dmem_rd;
dcache_en <= cpu_dmem_en and not busy; dcache_en <= dcached and cpu_dmem_en and dcache_en2; -- or write_fifo_full);
-- Instantiate synchronous FIFO -- Instantiate synchronous FIFO
inst_bout_fifo: entity work.fifo_sync_dist inst_bin_fifo: entity work.fifo_async
GENERIC MAP GENERIC MAP
( (
addr_width => 4, addr_width => 4,
data_width => 69 data_width => 32,
do_last_read_update => true
) )
PORT MAP PORT MAP
( (
rst => RST_I, rst => RST_I,
clk => CLK_I, clk_w => CLK_I,
clk_r => cpu_clk,
we => bin_fifo_we,
re => bin_fifo_re,
fifo_full => bin_fifo_full,
fifo_empty => bin_fifo_empty,
fifo_afull => open,
fifo_aempty => open,
data_w => bin_fifo_din,
data_r => bin_fifo_dout
);
bin_fifo_din <= DAT_I;
DAT <= bin_fifo_dout;
ACK <= not bin_fifo_empty;
bin_fifo_we <= ACK_I;
bin_fifo_re <= dmem_mem_rd_gnt or MRDY_O_icache or MRDY_O_dcache;
-- Instantiate synchronous FIFO
inst_bout_fifo: entity work.fifo_async
GENERIC MAP
(
addr_width => 4,
data_width => 69,
do_last_read_update => false
)
PORT MAP
(
rst => RST_I,
clk_w => cpu_clk,
clk_r => CLK_I,
we => bout_fifo_we, we => bout_fifo_we,
re => bout_fifo_re, re => bout_fifo_re,
fifo_full => bout_fifo_full, fifo_full => bout_fifo_full,
@@ -297,7 +346,7 @@ inst_bout_fifo: entity work.fifo_sync_dist
data_r => bout_fifo_dout data_r => bout_fifo_dout
); );
bout_rdy <= not bout_fifo_full; bout_rdy <= not bout_fifo_full;
bout_fifo_re <= not bout_fifo_empty and SRDY_I; bout_fifo_re <= SRDY_I and not bin_fifo_full;
bout_fifo_we <= STB_O_dmem_wr or STB_O_dmem_rd or STB_O_dcache or STB_O_icache; bout_fifo_we <= STB_O_dmem_wr or STB_O_dmem_rd or STB_O_dcache or STB_O_icache;
@@ -308,23 +357,26 @@ inst_bout_fifo: entity work.fifo_sync_dist
ADDR_O_dcache when dcache_mem_gnt = '1' else ADDR_O_dcache when dcache_mem_gnt = '1' else
ADDR_O_icache when icache_mem_gnt = '1' else (others => '-'); ADDR_O_icache when icache_mem_gnt = '1' else (others => '-');
bout_fifo_sel_in <= SEL_O_dmem_wr when dmem_mem_wr_gnt = '1' else (others => '0'); bout_fifo_sel_in <= SEL_O_dmem_wr when dmem_mem_wr_gnt = '1' else
SEL_O_dmem_rd when dmem_mem_rd_gnt = '1' else (others => '1');
bout_fifo_we_in <= '1' when dmem_mem_wr_gnt = '1' else '0'; bout_fifo_we_in <= '1' when dmem_mem_wr_gnt = '1' else '0';
-- Instantiate synchronous FIFO -- Instantiate synchronous FIFO
inst_write_fifo: entity work.fifo_sync_dist inst_write_fifo: entity work.fifo_sync
GENERIC MAP GENERIC MAP
( (
addr_width => 4, addr_width => 4,
data_width => 68 data_width => 68,
do_last_read_update => true
) )
PORT MAP PORT MAP
( (
rst => RST_I, rst => RST_I,
clk => CLK_I, clk => cpu_clk,
we => write_fifo_we, we => write_fifo_we,
re => write_fifo_re, re => write_fifo_re,
fifo_full => write_busy, fifo_full => write_fifo_full,
fifo_empty => write_fifo_empty, fifo_empty => write_fifo_empty,
fifo_afull => open, fifo_afull => open,
fifo_aempty => open, fifo_aempty => open,
@@ -344,20 +396,23 @@ inst_write_fifo: entity work.fifo_sync_dist
write_fifo_we <= cpu_dmem_en and not busy and cpu_dmem_we; write_fifo_we <= cpu_dmem_en and not busy and cpu_dmem_we;
dmem_rd_flags: dmem_rd_flags:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
uncached_access <= '0'; uncached_access <= '0';
if RST_I = '1' then if RST_I = '1' then
CYC_O_dmem_rd <= '0'; CYC_O_dmem_rd <= '0';
dcache_en2 <= '1';
else else
if ACK_I = '1' and dmem_mem_rd_gnt = '1' then if ACK = '1' and dmem_mem_rd_gnt = '1' then
uncached_access <= '1'; uncached_access <= '1';
CYC_O_dmem_rd <= '0'; CYC_O_dmem_rd <= '0';
dcache_en2 <= '1';
end if; end if;
if cpu_dmem_en = '1' and busy = '0' and cpu_dmem_we = '0' then if cpu_dmem_en = '1' and busy = '0' and cpu_dmem_we = '0' then
if dcached = '0' then if dcached = '0' then
CYC_O_dmem_rd <= '1'; CYC_O_dmem_rd <= '1';
dcache_en2 <= '0';
end if; end if;
end if; end if;
end if; end if;
@@ -365,31 +420,32 @@ dmem_rd_flags:
end process; end process;
dmem_rd_data: dmem_rd_data:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
if RST_I = '1' then if RST_I = '1' then
DAT_I_dmem_rd <= (others => '0'); DAT_I_dmem_rd <= (others => '0');
elsif ACK_I = '1' and CYC_O_dmem_rd = '1' then elsif ACK = '1' and CYC_O_dmem_rd = '1' then
DAT_I_dmem_rd <= DAT_I; DAT_I_dmem_rd <= DAT;
end if; end if;
end if; end if;
end process; end process;
dmem_rd_regs: dmem_rd_regs:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
if cpu_dmem_en = '1' and busy = '0' then if cpu_dmem_en = '1' and busy = '0' then
ADDR_O_dmem_rd <= cpu_dmem_addr; ADDR_O_dmem_rd <= cpu_dmem_addr;
SEL_O_dmem_rd <= cpu_dmem_be;
end if; end if;
end if; end if;
end process; end process;
bus_state_next: bus_state_next:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
if RST_I = '1' then if RST_I = '1' then
s <= init; s <= init;
else else
@@ -399,7 +455,7 @@ bus_state_next:
end process; end process;
bus_state: bus_state:
process(s, CYC_O_icache, CYC_O_dcache, CYC_O_dmem_wr, CYC_O_dmem_rd, bout_rdy, ACK_I) process(s, CYC_O_icache, CYC_O_dcache, CYC_O_dmem_wr, CYC_O_dmem_rd, bout_rdy, ACK)
begin begin
icache_mem_gnt <= '0'; icache_mem_gnt <= '0';
@@ -451,7 +507,7 @@ bus_state:
end if; end if;
when read_finish => when read_finish =>
dmem_mem_rd_gnt <= '1'; dmem_mem_rd_gnt <= '1';
if ACK_I = '1' then if ACK = '1' then
sn <= ready; sn <= ready;
end if; end if;
when others => when others =>
@@ -461,9 +517,9 @@ bus_state:
end process; end process;
bus_timeout_counter: bus_timeout_counter:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
if bus_idle = '0' then if bus_idle = '0' then
if bus_timeout_cnt /= 0 then if bus_timeout_cnt /= 0 then
bus_timeout_cnt <= bus_timeout_cnt - 1; bus_timeout_cnt <= bus_timeout_cnt - 1;
@@ -478,9 +534,9 @@ bus_timeout_counter:
end process; end process;
bus_err: bus_err:
process(CLK_I) process(cpu_clk)
begin begin
if rising_edge(CLK_I) then if rising_edge(cpu_clk) then
if RST_I = '1' then if RST_I = '1' then
cpu_imem_err <= '0'; cpu_imem_err <= '0';
cpu_dmem_err <= '0'; cpu_dmem_err <= '0';
+244 -113
View File
@@ -29,16 +29,24 @@ use work.mips_types.all;
use work.mips_instr.all; use work.mips_instr.all;
entity cop is entity cop is
Generic
(
icache_size : natural := 2048; -- words
icache_line : natural := 8; -- words
dcache_size : natural := 2048; -- words
dcache_line : natural := 8 -- words
);
Port Port
( (
rst : in STD_LOGIC; rst : in STD_LOGIC;
clk : in STD_LOGIC; clk : in STD_LOGIC;
sdu : in sdu_t; eb : in STD_LOGIC;
IR_valid : in STD_LOGIC; int : in unsigned(5 downto 0);
IR : in word_t; nmi : in STD_LOGIC;
events : in event_t; ir_en : in STD_LOGIC;
ctrl_in : in cop_ctrl_in_t; ir : in word_t;
ctrl_out : out cop_ctrl_out_t; ctrl_in : in cop0_ctrl_in_t;
ctrl_out : out cop0_ctrl_out_t;
din : in word_t; din : in word_t;
dout : out word_t dout : out word_t
); );
@@ -49,6 +57,8 @@ architecture Behavioral of cop is
signal epc : word_t; signal epc : word_t;
signal cause : word_t; signal cause : word_t;
signal status : word_t; signal status : word_t;
signal imem_addr : word_t;
signal imem_addr_we : STD_LOGIC;
signal BadVAddr : word_t; signal BadVAddr : word_t;
signal exc_code : unsigned(4 downto 0); signal exc_code : unsigned(4 downto 0);
signal test_reg : word_t; signal test_reg : word_t;
@@ -59,20 +69,30 @@ architecture Behavioral of cop is
signal code_reg_we : STD_LOGIC; signal code_reg_we : STD_LOGIC;
signal ip_reg_we : STD_LOGIC; signal ip_reg_we : STD_LOGIC;
signal bd : STD_LOGIC; signal bd : STD_LOGIC;
signal sw_int : unsigned(1 downto 0);
signal ip : unsigned(7 downto 0); signal ip : unsigned(7 downto 0);
signal im : unsigned(7 downto 0); signal im : unsigned(7 downto 0);
signal status_save : STD_LOGIC; signal status_save : STD_LOGIC;
signal status_rest : STD_LOGIC; signal status_rest : STD_LOGIC;
signal exception : STD_LOGIC;
signal exception_end : STD_LOGIC;
signal eflags : exc_flags_t; signal eflags : exc_flags_t;
signal exc_enable : STD_LOGIC; signal EB_reg : STD_LOGIC;
signal cop_EX_en : STD_LOGIC; signal icache_info : unsigned(7 downto 0);
signal dcache_info : unsigned(7 downto 0);
signal reg_rptr : reg_ptr_t;
signal reg_wptr : reg_ptr_t;
signal inject_exc : STD_LOGIC;
signal latch_vect_en : STD_LOGIC;
signal int_nmi : STD_LOGIC;
signal nmi_asserted : std_logic;
type cop_pipe_t is record type cop_pipe_t is record
din : word_t; opc : opcode_t;
RFE : std_logic;
CO : std_logic;
reg_ptr : reg_ptr_t;
rs : reg_ptr_t; rs : reg_ptr_t;
rd : reg_ptr_t; rd : reg_ptr_t;
rt : reg_ptr_t;
func : func_t; func : func_t;
we : std_logic; we : std_logic;
re : std_logic; re : std_logic;
@@ -93,93 +113,130 @@ architecture Behavioral of cop is
return result; return result;
end eval_int; end eval_int;
type exc_state_t is (exc_init, exc_idle, exc_commit_ID, exc_commit_EX, exc_commit_MEM); type exc_state_t is (exc_idle, exc_pipe_flush, exc_commit, exc_inject, exc_enter, exc_leave, exc_left);
signal exc_state, exc_staten : exc_state_t; signal exc_state, exc_staten : exc_state_t;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
begin begin
cop_pipe_ID.din <= din; icache_info <= "00" & to_unsigned(lg2(icache_line), 3) & to_unsigned(lg2(icache_size)-8, 3);
cop_pipe_ID.cs <= IR_valid; dcache_info <= "00" & to_unsigned(lg2(dcache_line), 3) & to_unsigned(lg2(dcache_size)-8, 3);
cop_pipe_ID.rs <= extract_rs(IR); cop_pipe_ID.cs <= ir_en;
cop_pipe_ID.rd <= extract_rd(IR); cop_pipe_ID.opc <= extract_opc(ir);
cop_pipe_ID.func <= extract_func(IR); cop_pipe_ID.rs <= extract_rs(ir);
cop_pipe_ID.re <= cop_pipe_ID.cs when cop_pipe_ID.rs = "00000" else '0'; cop_pipe_ID.rd <= extract_rd(ir);
cop_pipe_ID.we <= cop_pipe_ID.cs when cop_pipe_ID.rs = "00100" else '0'; cop_pipe_ID.rt <= extract_rt(ir);
cop_EX_en <= exc_enable and not status_save; cop_pipe_ID.func <= extract_func(ir);
cop_pipe_ID.CO <= ir(25);
ctrl_out.ee <= exc_enable; cop_pipe_ID.re <= cop_pipe_ID.cs when (cop_pipe_ID.opc = "111000" or (cop_pipe_ID.opc = "010000" and cop_pipe_ID.rs = "00000")) else '0';
ctrl_out.ec <= status_save; cop_pipe_ID.we <= cop_pipe_ID.cs when (cop_pipe_ID.opc = "110000" or (cop_pipe_ID.opc = "010000" and cop_pipe_ID.rs = "00100")) else '0';
ctrl_out.RE <= status(25); cop_pipe_ID.RFE <= cop_pipe_ID.cs when (cop_pipe_ID.CO = '1' and cop_pipe_ID.func = "010000") else '0';
ctrl_out.EB <= EB_reg xor (status(25) and status(1));
ctrl_out.user_mode <= status(1); ctrl_out.user_mode <= status(1);
ctrl_out.int <= eflags.Int; ctrl_out.exc_inject <= inject_exc or rst;
cop_pipe_ID.reg_ptr <= cop_pipe_ID.rd when cop_pipe_ID.opc = "010000" else cop_pipe_ID.rt;
ctrl_out.cop_read <= cop_pipe_EX.cs and cop_pipe_EX.re after 1 ns;
ctrl_out.reg_write <= cop_pipe_ID.re after 1 ns;
im <= status(15 downto 8); im <= status(15 downto 8);
cause <= bd & (30 downto 16 => '0') & ip & '0' & exc_code & "00"; cause <= bd & (30 downto 16 => '0') & ip & '0' & exc_code & "00";
eflags.Ov <= events.alu_ovf or events.alu_uvf; eflags.Ov <= ctrl_in.events.alu_ovf or ctrl_in.events.alu_uvf;
eflags.DAdEL <= events.data_load_err; eflags.DAdEL <= ctrl_in.events.data_load_err;
eflags.DAdES <= events.data_store_err; eflags.DAdES <= ctrl_in.events.data_store_err;
eflags.IAdEL <= events.inst_load_err; eflags.IAdEL <= ctrl_in.events.inst_load_err;
eflags.IAdEK <= events.inst_priv_addr and status(1); eflags.IAdEK <= ctrl_in.events.inst_priv_addr and status(1);
eflags.Sys <= events.syscall; eflags.Sys <= ctrl_in.events.syscall;
eflags.Bp <= events.break; eflags.Bp <= ctrl_in.events.break;
eflags.RI <= events.illegal; eflags.RI <= ctrl_in.events.illegal;
eflags.Int <= eval_int(ip) and status(0); eflags.Int <= ctrl_in.events.int;
exception <= eflags.Ov or eflags.Sys or eflags.Bp or eflags.RI or eflags.IAdEL or eflags.IAdEK or eflags.DAdEL or eflags.DAdES or eflags.Int after 1 ns; -- NMI/RST transition detector
proc_nmi_transition:
process(clk)
begin
if rising_edge(clk) then
if rst = '1' then
int_nmi <= '0';
nmi_asserted <= '0';
elsif latch_vect_en = '1' then
int_nmi <= '0';
elsif nmi_asserted = '1' then
if nmi = '0' then
nmi_asserted <= '0';
int_nmi <= '1';
end if;
elsif nmi = '1' then
nmi_asserted <= '1';
end if;
end if;
end process;
exception_state:
process(exc_state, ctrl_in, exception, sdu) -- Main exception FSM
proc_exc_state:
process(exc_state, ctrl_in, cop_pipe_ID)
begin begin
exc_enable <= '0';
ctrl_out.exc_commit <= '0'; ctrl_out.exc_commit <= '0';
ctrl_out.exc_pending <= '0'; ctrl_out.exc_pending <= '0';
ctrl_out.exc_exit <= '0';
epc_reg_we <= '0'; epc_reg_we <= '0';
code_reg_we <= '0'; code_reg_we <= '0';
status_save <= '0'; status_save <= '0';
eflags_reg_we <= '0'; status_rest <= '0';
inject_exc <= '0';
imem_addr_we <= '0';
latch_vect_en <= '0';
exc_staten <= exc_state; exc_staten <= exc_state;
case exc_state is case exc_state is
when exc_init =>
exc_staten <= exc_idle;
when exc_idle => when exc_idle =>
exc_enable <= '1'; if cop_pipe_ID.RFE = '1' then
if exception = '1' then exc_staten <= exc_leave;
status_save <= '1'; ctrl_out.exc_exit <= '1';
eflags_reg_we <= '1'; ctrl_out.exc_commit <= '1';
elsif ctrl_in.exc_req = '1' then
exc_staten <= exc_pipe_flush;
imem_addr_we <= '1';
end if;
when exc_pipe_flush =>
ctrl_out.exc_pending <= '1';
ctrl_out.exc_commit <= '1';
if ctrl_in.exc_ack = '1' then
exc_staten <= exc_commit;
end if;
when exc_commit =>
latch_vect_en <= '1';
ctrl_out.exc_pending <= '1';
ctrl_out.exc_commit <= '1';
if ctrl_in.sdu.ID_stall = '0' then
exc_staten <= exc_inject;
end if;
when exc_inject =>
ctrl_out.exc_pending <= '1';
ctrl_out.exc_commit <= '1';
code_reg_we <= '1'; code_reg_we <= '1';
exc_staten <= exc_commit_ID; status_save <= '1';
end if;
when exc_commit_ID =>
ctrl_out.exc_pending <= '1';
ctrl_out.exc_commit <= '1';
if sdu.ID_stall = '0' then
exc_staten <= exc_commit_EX;
end if;
when exc_commit_EX =>
ctrl_out.exc_pending <= '1';
ctrl_out.exc_commit <= '1';
if sdu.EX_stall = '0' then
exc_staten <= exc_commit_MEM;
end if;
when exc_commit_MEM =>
ctrl_out.exc_pending <= '1';
if sdu.MEM_stall = '0' then
epc_reg_we <= '1'; epc_reg_we <= '1';
inject_exc <= '1';
exc_staten <= exc_enter;
when exc_enter =>
ctrl_out.exc_pending <= '1';
exc_staten <= exc_idle;
when exc_leave =>
exc_staten <= exc_left;
status_rest <= '1';
ctrl_out.exc_exit <= '1';
ctrl_out.exc_commit <= '1';
when exc_left =>
exc_staten <= exc_idle; exc_staten <= exc_idle;
end if;
when others => when others =>
exc_staten <= exc_idle; exc_staten <= exc_idle;
@@ -187,18 +244,41 @@ exception_state:
end case; end case;
end process; end process;
exception_state_next: proc_exc_state_next:
process(clk) process(clk)
begin begin
if rising_edge(clk) then if rising_edge(clk) then
if rst = '1' then if rst = '1' then
exc_state <= exc_init; exc_state <= exc_idle;
else else
exc_state <= exc_staten; exc_state <= exc_staten;
end if; end if;
end if; end if;
end process; end process;
-- Endian switch sampled at hard reset
sample_endian:
process(clk)
begin
if rising_edge(clk) then
if rst = '1' then
EB_reg <= eb;
end if;
end if;
end process;
-- Sample imem_addr for later use
exception_last_imem_addr:
process(clk)
begin
if rising_edge(clk) then
if imem_addr_we = '1' then
imem_addr <= ctrl_in.imem_addr;
end if;
end if;
end process;
-- EPC reg and BD-bit write
cop_exception_epc_write: cop_exception_epc_write:
process(clk) process(clk)
begin begin
@@ -217,6 +297,7 @@ cop_exception_epc_write:
end if; end if;
end process; end process;
-- BadVaddr and exception code write
cop_exception_map: cop_exception_map:
process(clk) process(clk)
begin begin
@@ -235,10 +316,10 @@ cop_exception_map:
exc_code <= "01010"; exc_code <= "01010";
elsif eflags.IAdEL = '1' then elsif eflags.IAdEL = '1' then
exc_code <= "00100"; exc_code <= "00100";
BadVAddr <= ctrl_in.imem_addr; BadVAddr <= imem_addr;
elsif eflags.IAdEK = '1' then elsif eflags.IAdEK = '1' then
exc_code <= "00100"; exc_code <= "00100";
BadVAddr <= ctrl_in.imem_addr; BadVAddr <= imem_addr;
elsif eflags.DAdEL = '1' then elsif eflags.DAdEL = '1' then
exc_code <= "00100"; exc_code <= "00100";
BadVAddr <= ctrl_in.dmem_addr; BadVAddr <= ctrl_in.dmem_addr;
@@ -252,51 +333,78 @@ cop_exception_map:
end if; end if;
end process; end process;
status_rest <= exception_end and ctrl_in.exc_left; ctrl_out.icache.inv_addr <= test_reg;
ctrl_out.dcache.inv_addr <= test_reg;
cop_status_restore: -- Custom I/D-Cache operations: invalidate all/line
cop_cache_op:
process(clk) process(clk)
begin begin
if rising_edge(clk) then if rising_edge(clk) then
if rst = '1' then ctrl_out.icache.inv_at <= '0';
exception_end <= '0'; ctrl_out.icache.inv_all <= '0';
ctrl_out.exc_exit <= '0'; ctrl_out.dcache.inv_at <= '0';
else ctrl_out.dcache.inv_all <= '0';
if cop_pipe_ID.func = "10000" and exception_end = '0' then -- RFE if cop_pipe_ID.cs = '1' and cop_pipe_ID.CO = '1' then
exception_end <= cop_pipe_ID.cs; case cop_pipe_ID.func is
ctrl_out.exc_exit <= cop_pipe_ID.cs; when "100000" =>
elsif exception_end = '1' and ctrl_in.exc_left = '1' then ctrl_out.icache.inv_all <= '1';
exception_end <= '0'; when "100001" =>
ctrl_out.exc_exit <= '0'; ctrl_out.icache.inv_at <= '1';
end if; when "100010" =>
ctrl_out.dcache.inv_all <= '1';
when "100011" =>
ctrl_out.dcache.inv_at <= '1';
when others => null;
end case;
end if; end if;
end if; end if;
end process; end process;
-- IP register write and signalling Int to pipeline
cop_ip_reg_write: cop_ip_reg_write:
process(clk) process(clk)
variable ip_v : unsigned(7 downto 0);
variable ipm_v : unsigned(7 downto 0);
begin begin
if rising_edge(clk) then if rising_edge(clk) then
if rst = '1' then if rst = '1' then
ip(1 downto 0) <= (others => '0'); sw_int <= (others => '0');
elsif ip_reg_we = '1' then elsif ctrl_in.sdu.WB_nop = '0' then
ip(1 downto 0) <= cop_pipe_EX.din(9 downto 8) and im(1 downto 0); if ip_reg_we = '1' then
sw_int <= din(9 downto 8);
end if; end if;
ip(7 downto 2) <= events.Int and im(7 downto 2); end if;
ip_v := (int & sw_int);
ipm_v := ip_v and im;
ip <= ip_v;
ctrl_out.int <= (eval_int(ipm_v) and status(0));
ctrl_out.NMI <= int_nmi;
end if; end if;
end process; end process;
-- Exception vector dispatch
cop_exc_vector: cop_exc_vector:
process(clk) process(clk)
begin begin
if rising_edge(clk) then if rising_edge(clk) then
ctrl_out.exc_vec <= X"80000180"; if rst = '1' then
ctrl_out.exc_vec <= X"BFC00000";
elsif latch_vect_en = '1' then
if ctrl_in.events.nmi = '1' then
ctrl_out.exc_vec <= X"BFC00000";
else
ctrl_out.exc_vec <= X"80000080";
if status(22) = '1' then if status(22) = '1' then
ctrl_out.exc_vec <= X"BFC00180"; ctrl_out.exc_vec <= X"BFC00180";
end if; end if;
end if; end if;
end if;
end if;
end process; end process;
-- Cop pipeline
cop_pipe: cop_pipe:
process(clk) process(clk)
begin begin
@@ -305,20 +413,25 @@ cop_pipe:
cop_pipe_EX.cs <= '0'; cop_pipe_EX.cs <= '0';
cop_pipe_EX.we <= '0'; cop_pipe_EX.we <= '0';
cop_pipe_EX.re <= '0'; cop_pipe_EX.re <= '0';
else elsif ctrl_in.sdu.stall_all = '0' then
if sdu.EX_stall = '0' then
cop_pipe_EX <= cop_pipe_ID; cop_pipe_EX <= cop_pipe_ID;
if cop_pipe_ID.we = '1' then
reg_wptr <= cop_pipe_ID.reg_ptr;
end if;
if cop_pipe_ID.re = '1' then
reg_rptr <= cop_pipe_ID.reg_ptr;
end if; end if;
end if; end if;
end if; end if;
end process; end process;
-- COP Register read
cop_register_read: cop_register_read:
process(clk) process(reg_rptr, BadVAddr, status, cause, epc, dcache_info, icache_info, test_reg)
variable reg : word_t; variable reg : word_t;
begin begin
if rising_edge(clk) and cop_pipe_ID.re = '1' and sdu.ID_stall = '0' then
case cop_pipe_ID.rd is case reg_rptr is
when "01000" => -- BadVAddr when "01000" => -- BadVAddr
reg := BadVAddr; reg := BadVAddr;
@@ -332,7 +445,7 @@ cop_register_read:
reg := epc; reg := epc;
when "01111" => -- PRId (Processor Revision Register) when "01111" => -- PRId (Processor Revision Register)
reg := X"000002" & to_unsigned(REVISION ,8); reg := dcache_info & icache_info & X"02" & to_unsigned(REVISION ,8);
when "11111" => -- test_reg when "11111" => -- test_reg
reg := test_reg; reg := test_reg;
@@ -341,10 +454,12 @@ cop_register_read:
reg := (others => '-'); reg := (others => '-');
end case; end case;
dout <= reg after 1 ns;
end if; dout <= reg after 2 ns;
end process; end process;
-- COP Register write strobe generation
cop_we_gen: cop_we_gen:
process(clk) process(clk)
begin begin
@@ -353,20 +468,20 @@ cop_we_gen:
test_reg_we <= '0'; test_reg_we <= '0';
stat_reg_we <= '0'; stat_reg_we <= '0';
ip_reg_we <= '0'; ip_reg_we <= '0';
else elsif ctrl_in.sdu.stall_all = '0' then
test_reg_we <= '0'; test_reg_we <= '0';
stat_reg_we <= '0'; stat_reg_we <= '0';
ip_reg_we <= '0'; ip_reg_we <= '0';
if (cop_EX_en and cop_pipe_EX.we) = '1' then if cop_pipe_EX.we = '1' then
case cop_pipe_EX.rd is case reg_wptr is
when "01100" => when "01100" =>
stat_reg_we <= not status(1) or status(28); stat_reg_we <= '1'; -- not status(1) or status(28);
when "01101" => when "01101" =>
ip_reg_we <= not status(1) or status(28); ip_reg_we <= '1'; -- not status(1) or status(28);
when "11111" => when "11111" =>
test_reg_we <= not status(1) or status(28); test_reg_we <= '1'; -- not status(1) or status(28);
when others => null; when others => null;
end case; end case;
@@ -376,36 +491,52 @@ cop_we_gen:
end if; end if;
end process; end process;
-- COP Test Register
cop_test_reg_write: cop_test_reg_write:
process(clk) process(clk)
begin begin
if rising_edge(clk) then if rising_edge(clk) then
if rst = '1' then if rst = '1' then
test_reg <= (others => '0'); test_reg <= (others => '0');
else --if ce = '1' then elsif ctrl_in.sdu.WB_nop = '0' then
if test_reg_we = '1' then if test_reg_we = '1' then
test_reg <= cop_pipe_EX.din; test_reg <= din;
end if; end if;
end if; end if;
end if; end if;
end process; end process;
-- COP Status Register
cop_status_reg_write: cop_status_reg_write:
process(clk) process(clk)
begin begin
if rising_edge(clk) then if rising_edge(clk) then
if rst = '1' then if rst = '1' then
status <= X"00400000"; status <= X"00600000";
else elsif status_save = '1' then
if status_save = '1' then if ctrl_in.events.nmi = '0' then
status(5 downto 4) <= status(3 downto 2); status(5 downto 4) <= status(3 downto 2);
status(3 downto 2) <= status(1 downto 0); status(3 downto 2) <= status(1 downto 0);
else
status(22) <= '1';
end if;
status(1 downto 0) <= "00"; status(1 downto 0) <= "00";
elsif status_rest = '1' then elsif status_rest = '1' then
status(1 downto 0) <= status(3 downto 2); status(1 downto 0) <= status(3 downto 2);
status(3 downto 2) <= status(5 downto 4); status(3 downto 2) <= status(5 downto 4);
elsif stat_reg_we = '1' then elsif ctrl_in.sdu.WB_nop = '0' then
status <= cop_pipe_EX.din; if stat_reg_we = '1' then
if status(1) = '0' then
status(0) <= din(0); -- IEc
status(1) <= din(1); -- KUc
status(2) <= din(2); -- IEp
status(3) <= din(3); -- KUp
status(4) <= din(4); -- IEo
status(5) <= din(5); -- KUo
end if;
status(15 downto 8) <= din(15 downto 8); -- IM
status(22) <= din(22); -- BEV
status(25) <= din(25); -- RE
end if; end if;
end if; end if;
end if; end if;
-101
View File
@@ -1,101 +0,0 @@
--------------------------------------------------------------------------
-- Project: JIPS, a portable 32-bit RISC CPU written in VHDL
-- This file: The datapath controller
--
-- Copyright (C) 2008 J. Ahrensfeld
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
--------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
library work;
use work.mips_types.all;
use work.mips_instr.all;
entity idecode_rom is
Port
(
nop : in std_logic;
inst_in : in word_t;
ctrl_out : out ctrl_lines_t
);
end idecode_rom;
architecture Behavioral of idecode_rom is
signal ctrl_special : ctrl_lines_t;
signal ctrl_regimm : ctrl_lines_t;
signal ctrl_opcode : ctrl_lines_t;
signal rom_special : rom_special_t := gen_rom_special;
signal rom_regimm : rom_regimm_t := gen_rom_regimm;
signal rom_opcode : rom_opcode_t := gen_rom_opcode;
attribute rom_style : string;
attribute rom_style of rom_special: signal is "distributed";
attribute rom_style of rom_regimm: signal is "distributed";
attribute rom_style of rom_opcode: signal is "distributed";
begin
i_dec_special:
process(inst_in, rom_special)
variable func : func_t;
begin
func := extract_func(inst_in);
ctrl_special <= rom_special(to_integer(func));
end process;
i_dec_regimm:
process(inst_in, rom_regimm)
variable rt : reg_ptr_t;
begin
rt := extract_rt(inst_in);
ctrl_regimm <= rom_regimm(to_integer(rt));
end process;
i_dec_opcode:
process(inst_in, rom_opcode)
variable opc : opcode_t;
begin
opc := extract_opc(inst_in);
ctrl_opcode <= rom_opcode(to_integer(opc));
end process;
proc_decode:
process(inst_in, ctrl_special, ctrl_regimm, ctrl_opcode, nop)
variable opclass : opcode_t;
begin
opclass := extract_opc(inst_in);
ctrl_out <= ctrl_lines_default after 2 ns;
if nop = '0' then
case opclass is
when "000000" =>
ctrl_out <= ctrl_special after 2 ns;
when "000001" =>
ctrl_out <= ctrl_regimm after 2 ns;
when others =>
ctrl_out <= ctrl_opcode after 2 ns;
end case;
end if;
end process;
end Behavioral;
+143 -78
View File
@@ -43,12 +43,7 @@ package mips_instr is
function extract_bimm18(instr, pc : word_t) return word_t; function extract_bimm18(instr, pc : word_t) return word_t;
function decode_op(instr : word_t) return op_t; function decode_op(instr : word_t) return op_t;
function ctrl_lines_default return ctrl_lines_t; function ctrl_lines_default return ctrl_lines_t;
function special_ctrl_lines(func : func_t) return ctrl_lines_t; function opcode_ctrl_lines(instr : word_t) return ctrl_lines_t;
function regimm_ctrl_lines(rt : reg_ptr_t) return ctrl_lines_t;
function opcode_ctrl_lines(opc : opcode_t) return ctrl_lines_t;
function gen_rom_opcode return rom_opcode_t;
function gen_rom_regimm return rom_regimm_t;
function gen_rom_special return rom_special_t;
end mips_instr; end mips_instr;
@@ -153,14 +148,16 @@ package body mips_instr is
variable opc : natural range 0 to 63; variable opc : natural range 0 to 63;
variable func : natural range 0 to 63; variable func : natural range 0 to 63;
variable rt : natural range 0 to 31; variable rt : natural range 0 to 31;
variable rs : natural range 0 to 31;
begin begin
opc := to_integer(extract_opc(instr)); opc := to_integer(extract_opc(instr));
func := to_integer(extract_func(instr)); func := to_integer(extract_func(instr));
rt := to_integer(extract_rt(instr)); rt := to_integer(extract_rt(instr));
rs := to_integer(extract_rs(instr));
result := op_sll; result := reserved;
case opc is case opc is
@@ -318,15 +315,103 @@ package body mips_instr is
when 16 => when 16 =>
result := op_cop0; result := op_cop0;
case rs is
when 0 =>
result := op_mfc0;
when 2 =>
result := op_cfc0; -- illegal
when 4 =>
result := op_mtc0;
when 6 =>
result := op_ctc0; -- illegal
when 8 =>
case rt is
when 0 =>
result := op_bcf0; -- illegal
when 1 =>
result := op_bct0; -- illegal
when others => null; -- undef
end case;
when others => null; -- undef
end case;
when 17 => when 17 =>
result := op_cop1; result := op_cop1;
case rs is
when 0 =>
result := op_mfc1;
when 2 =>
result := op_cfc1;
when 4 =>
result := op_mtc1;
when 6 =>
result := op_ctc1;
when 8 =>
case rt is
when 0 =>
result := op_bcf1;
when 1 =>
result := op_bct1;
when others => null; -- undef
end case;
when others => null; -- undef
end case;
when 18 => when 18 =>
result := op_cop2; result := op_cop2;
case rs is
when 0 =>
result := op_mfc2;
when 2 =>
result := op_cfc2;
when 4 =>
result := op_mtc2;
when 6 =>
result := op_ctc2;
when 8 =>
case rt is
when 0 =>
result := op_bcf2;
when 1 =>
result := op_bct2;
when others => null; -- undef
end case;
when others => null; -- undef
end case;
when 19 => when 19 =>
result := op_cop3; result := op_cop3;
case rs is
when 0 =>
result := op_mfc3;
when 2 =>
result := op_cfc3;
when 4 =>
result := op_mtc3;
when 6 =>
result := op_ctc3;
when 8 =>
case rt is
when 0 =>
result := op_bcf3;
when 1 =>
result := op_bct3;
when others => null; -- undef
end case;
when others => null; -- undef
end case;
when 32 => when 32 =>
result := op_lb; result := op_lb;
@@ -364,6 +449,9 @@ package body mips_instr is
when 46 => when 46 =>
result := op_swr; result := op_swr;
when 48 =>
result := op_lwc0; -- illegal
when 49 => when 49 =>
result := op_lwc1; result := op_lwc1;
@@ -373,6 +461,9 @@ package body mips_instr is
when 51 => when 51 =>
result := op_lwc3; result := op_lwc3;
when 56 =>
result := op_swc0; -- illegal
when 57 => when 57 =>
result := op_swc1; result := op_swc1;
@@ -394,6 +485,7 @@ package body mips_instr is
variable result : ctrl_lines_t; variable result : ctrl_lines_t;
begin begin
result.cop_instr_en := '0'; result.cop_instr_en := '0';
result.cop_read := '0';
result.jump := '0'; result.jump := '0';
result.jump_long := '0'; result.jump_long := '0';
result.branch := '0'; result.branch := '0';
@@ -436,16 +528,24 @@ package body mips_instr is
end ctrl_lines_default; end ctrl_lines_default;
function opcode_ctrl_lines(instr : word_t) return ctrl_lines_t is
function special_ctrl_lines(func : func_t) return ctrl_lines_t is
variable result : ctrl_lines_t; variable result : ctrl_lines_t;
variable op : integer range 0 to 2**func_t'length-1; variable opc : integer range 0 to 2**opcode_t'length-1;
variable func : integer range 0 to 2**func_t'length-1;
variable rt : integer range 0 to 2**reg_ptr_t'length-1;
variable rs : integer range 0 to 2**reg_ptr_t'length-1;
begin begin
result := ctrl_lines_default; result := ctrl_lines_default;
opc := to_integer(extract_opc(instr));
func := to_integer(extract_func(instr));
rt := to_integer(extract_rt(instr));
rs := to_integer(extract_rs(instr));
op := to_integer(func); case opc is
case op is -- SPECIAL
when 0 =>
case func is
-- when op_add => -- when op_add =>
when 32 => when 32 =>
@@ -653,32 +753,9 @@ package body mips_instr is
end case; end case;
return result; -- REGIMM
when 1 =>
end special_ctrl_lines; case rt is
function gen_rom_special return rom_special_t is
variable result : rom_special_t;
variable func : func_t;
begin
for i in 0 to 2**func_t'length-1 loop
func := to_unsigned(i, func_t'length);
result(i) := special_ctrl_lines(func);
end loop;
return result;
end gen_rom_special;
function regimm_ctrl_lines(rt : reg_ptr_t) return ctrl_lines_t is
variable result : ctrl_lines_t;
variable op : integer range 0 to 2**reg_ptr_t'length-1;
begin
result := ctrl_lines_default;
op := to_integer(rt);
case op is
-- when op_bgez => -- when op_bgez =>
when 1 => when 1 =>
@@ -715,32 +792,21 @@ package body mips_instr is
end case; end case;
return result; -- when COPz =>
when 16 | 17 | 18 | 19 =>
result.cop_instr_en := '1';
case rs is
when 0 => -- MFCz
result.cop_read := '1';
result.reg_write := '1';
when 2 => -- CFCz
result.cop_read := '1';
result.reg_write := '1';
end regimm_ctrl_lines; when others => null; -- undef
function gen_rom_regimm return rom_regimm_t is end case;
variable result : rom_regimm_t;
variable rt : reg_ptr_t;
begin
for i in 0 to 2**reg_ptr_t'length-1 loop
rt := to_unsigned(i, reg_ptr_t'length);
result(i) := regimm_ctrl_lines(rt);
end loop;
return result;
end gen_rom_regimm;
function opcode_ctrl_lines(opc : opcode_t) return ctrl_lines_t is
variable result : ctrl_lines_t;
variable op : integer range 0 to 2**opcode_t'length-1;
begin
result := ctrl_lines_default;
op := to_integer(opc);
case op is
-- when op_addi => -- when op_addi =>
when 8 => when 8 =>
@@ -793,10 +859,6 @@ package body mips_instr is
result.bc_src := bc_eq_ne; result.bc_src := bc_eq_ne;
result.bc_not := '1'; result.bc_not := '1';
-- when op_cop =>
when 16 | 17 | 18 | 19 =>
result.cop_instr_en := '1';
-- when op_j => -- when op_j =>
when 2 => when 2 =>
result.jump := '1'; result.jump := '1';
@@ -870,6 +932,13 @@ package body mips_instr is
result.reg_write := '1'; result.reg_write := '1';
result.except_en := '1'; result.except_en := '1';
-- when op_lwcz =>
when 48 | 49 | 50 | 51 =>
-- result.imm_src := src_imm32;
result.dmem_en := '1';
result.except_en := '1';
result.cop_instr_en := '1';
-- when op_lwl => -- when op_lwl =>
when 34 => when 34 =>
-- result.imm_src := src_imm32; -- result.imm_src := src_imm32;
@@ -942,6 +1011,15 @@ package body mips_instr is
-- result.imm_src := src_imm32; -- result.imm_src := src_imm32;
result.except_en := '1'; result.except_en := '1';
-- when op_swcz =>
when 56 | 57 | 58 | 59 =>
result.dmem_en := '1';
result.dmem_we := '1';
-- result.imm_src := src_imm32;
result.except_en := '1';
result.cop_instr_en := '1';
result.cop_read := '1';
-- when op_swl => -- when op_swl =>
when 42 => when 42 =>
result.dmem_en := '1'; result.dmem_en := '1';
@@ -977,19 +1055,6 @@ package body mips_instr is
end opcode_ctrl_lines; end opcode_ctrl_lines;
function gen_rom_opcode return rom_opcode_t is
variable result : rom_opcode_t;
variable opc : opcode_t;
begin
for i in 0 to 2**opcode_t'length-1 loop
opc := to_unsigned(i, opcode_t'length);
result(i) := opcode_ctrl_lines(opc);
end loop;
return result;
end gen_rom_opcode;
end mips_instr; end mips_instr;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
+127 -165
View File
@@ -33,8 +33,7 @@ entity pipeline is
( (
rst : in STD_LOGIC; rst : in STD_LOGIC;
clk : in STD_LOGIC; clk : in STD_LOGIC;
halt : in STD_LOGIC; ce : in STD_LOGIC;
int : in unsigned(5 downto 0);
imem_err : in STD_LOGIC; imem_err : in STD_LOGIC;
imem_rdy : in STD_LOGIC; imem_rdy : in STD_LOGIC;
imem_en : out STD_LOGIC; imem_en : out STD_LOGIC;
@@ -47,7 +46,14 @@ entity pipeline is
dmem_be : out unsigned(3 downto 0); dmem_be : out unsigned(3 downto 0);
dmem_addr : out word_t; dmem_addr : out word_t;
dmem_din : in word_t; dmem_din : in word_t;
dmem_dout : out word_t dmem_dout : out word_t;
cop_ir : out word_t;
cop_ir_en : out STD_LOGIC;
cop_din : in word_t;
cop_dout : out word_t;
c0_ctrl_out : out cop0_ctrl_in_t;
c0_ctrl_in : in cop0_ctrl_out_t
); );
end pipeline; end pipeline;
@@ -74,16 +80,6 @@ architecture Behavioral of pipeline is
); );
END COMPONENT; END COMPONENT;
--------------------------------------------------------------------------
COMPONENT idecode_rom is
Port
(
nop : in std_logic;
inst_in : in word_t;
ctrl_out : out ctrl_lines_t
);
END COMPONENT;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
COMPONENT shifter is COMPONENT shifter is
Generic Generic
@@ -129,23 +125,6 @@ architecture Behavioral of pipeline is
); );
END COMPONENT; END COMPONENT;
--------------------------------------------------------------------------
COMPONENT cop is
Port
(
rst : in STD_LOGIC;
clk : in STD_LOGIC;
sdu : in sdu_t;
IR_valid : in STD_LOGIC;
IR : in word_t;
events : in event_t;
ctrl_in : in cop_ctrl_in_t;
ctrl_out : out cop_ctrl_out_t;
din : in word_t;
dout : out word_t
);
END COMPONENT;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
COMPONENT muldiv is COMPONENT muldiv is
Port Port
@@ -165,8 +144,6 @@ architecture Behavioral of pipeline is
END COMPONENT; END COMPONENT;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
constant RESET_VECTOR : word_t := X"BFC00000";
signal ID_stage : ID_t; signal ID_stage : ID_t;
signal EX_stage : EX_t; signal EX_stage : EX_t;
signal MEM_stage : MEM_t; signal MEM_stage : MEM_t;
@@ -174,20 +151,10 @@ architecture Behavioral of pipeline is
signal clk_2, clk_1 : STD_LOGIC; signal clk_2, clk_1 : STD_LOGIC;
signal hdu : hdu_t; signal hdu : hdu_t;
signal sdu : sdu_t; signal sdu : sdu_t;
signal cpu_rst : STD_LOGIC;
signal reg_a : word_t; signal reg_a : word_t;
signal reg_b : word_t; signal reg_b : word_t;
signal ctrl_lines : ctrl_lines_t;
signal cpu_run : STD_LOGIC;
signal branch_ce : STD_LOGIC; signal branch_ce : STD_LOGIC;
signal run_en : STD_LOGIC; signal cpu_run : STD_LOGIC;
signal mul_dep : STD_LOGIC;
signal imem_dep : STD_LOGIC;
signal dmem_dep : STD_LOGIC;
signal cop_ctrl : cop_ctrl_in_t;
signal cop_stat : cop_ctrl_out_t;
signal cop_din : word_t;
signal cop_dout : word_t;
signal alu_result : word_t; signal alu_result : word_t;
signal mul_result : word_t; signal mul_result : word_t;
signal mul_busy : STD_LOGIC; signal mul_busy : STD_LOGIC;
@@ -200,11 +167,9 @@ architecture Behavioral of pipeline is
signal bcu_op_b : word_t; signal bcu_op_b : word_t;
signal bcu_flags : bcu_flags_t; signal bcu_flags : bcu_flags_t;
signal vaddr : word_t; signal vaddr : word_t;
signal dmem_src : word_t;
attribute ram_style : string; signal stage_rst : unsigned(3 downto 0);
signal pipe_rst : STD_LOGIC;
attribute ram_style of reg_a: signal is "distributed";
attribute ram_style of reg_b: signal is "distributed";
signal pc : pc_t; signal pc : pc_t;
@@ -213,24 +178,41 @@ begin
clk_1 <= clk; clk_1 <= clk;
clk_2 <= not clk; clk_2 <= not clk;
cpu_run <= run_en; cpu_run <= ce;
-- Stall Detection Unit --------------------------------------------------- -- Stall Detection Unit ---------------------------------------------------
sdu.ID_nop <= imem_dep or cop_stat.exc_pending or EX_stage.exc or MEM_stage.exc; sdu.ID_nop <= sdu.imem_dep or c0_ctrl_in.exc_pending or ID_stage.exc or EX_stage.exc or MEM_stage.exc;
sdu.EX_nop <= mul_dep or ID_stage.nop or ID_stage.exc; sdu.EX_nop <= sdu.mul_dep or ID_stage.nop or ID_stage.exc;
sdu.MEM_nop <= EX_stage.nop or EX_stage.exc; sdu.MEM_nop <= EX_stage.nop or EX_stage.exc;
sdu.WB_nop <= dmem_dep or MEM_stage.nop; sdu.WB_nop <= sdu.dmem_dep or MEM_stage.nop;
sdu.ID_stall <= dmem_dep or imem_dep or mul_dep or ID_stage.exc; sdu.stall_all <= sdu.dmem_dep;
sdu.EX_stall <= dmem_dep; sdu.ID_stall <= sdu.stall_all or sdu.imem_dep or sdu.mul_dep or c0_ctrl_in.exc_exit;
sdu.MEM_stall <= dmem_dep; sdu.EX_stall <= sdu.stall_all;
sdu.MEM_stall <= sdu.stall_all;
sdu.WB_stall <= '0'; sdu.WB_stall <= '0';
mul_dep <= ID_stage.ctrl.mul_access and (EX_stage.ctrl.mul_start or mul_busy); sdu.mul_dep <= ID_stage.ctrl.mul_access and (EX_stage.ctrl.mul_start or mul_busy);
imem_dep <= not imem_rdy; sdu.imem_dep <= not imem_rdy;
dmem_dep <= not dmem_rdy and MEM_stage.ctrl.dmem_en; sdu.dmem_dep <= not dmem_rdy and MEM_stage.ctrl.dmem_en;
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
imem_en <= cpu_run and not (mul_dep or dmem_dep or cop_stat.exc_commit); imem_en <= cpu_run and not (sdu.mul_dep or sdu.dmem_dep or c0_ctrl_in.exc_commit);
--------------------------------------------------------------------------
-- Coprocessor assignments
--------------------------------------------------------------------------
c0_ctrl_out.bd_wb <= WB_stage.bd;
c0_ctrl_out.epc_mem <= MEM_stage.pcn;
c0_ctrl_out.epc_wb <= MEM_stage.epc;
c0_ctrl_out.imem_addr <= EX_stage.epc;
c0_ctrl_out.dmem_addr <= MEM_stage.va;
c0_ctrl_out.sdu <= sdu;
c0_ctrl_out.events <= WB_stage.events;
c0_ctrl_out.exc_req <= MEM_stage.exc;
c0_ctrl_out.exc_ack <= WB_stage.exc;
cop_ir <= ID_stage.IR;
cop_ir_en <= ID_stage.ctrl.cop_instr_en;
cop_dout <= dmem_din when MEM_stage.ctrl.dmem_en = '1' else MEM_stage.ex_result;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
-- Muldiv -- Muldiv
@@ -238,7 +220,7 @@ begin
inst_muldiv: muldiv inst_muldiv: muldiv
PORT MAP PORT MAP
( (
rst => cpu_rst, rst => rst,
clk => clk, clk => clk,
hilo_we => EX_stage.ctrl.mul_hilo_we, hilo_we => EX_stage.ctrl.mul_hilo_we,
din_hi => EX_stage.reg_a, din_hi => EX_stage.reg_a,
@@ -251,47 +233,33 @@ inst_muldiv: muldiv
dout => mul_result dout => mul_result
); );
--------------------------------------------------------------------------
-- Coprocessor
--------------------------------------------------------------------------
inst_cop: cop
PORT MAP
(
rst => cpu_rst,
clk => clk,
sdu => sdu,
events => MEM_stage.events,
IR_valid => ID_stage.ctrl.cop_instr_en,
IR => ID_stage.IR,
ctrl_in => cop_ctrl,
ctrl_out => cop_stat,
dout => cop_dout,
din => cop_din
);
cop_ctrl.bd_wb <= WB_stage.bd;
cop_ctrl.epc_mem <= MEM_stage.pcn;
cop_ctrl.epc_wb <= MEM_stage.epc;
cop_ctrl.imem_addr <= pc.nxt;
cop_ctrl.dmem_addr <= MEM_stage.va;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
-- IF stage -- IF stage
-------------------------------------------------------------------------- --------------------------------------------------------------------------
imem_addr <= pc.curr; imem_addr <= pc.curr;
proc_stage_pc: pipe_rst <= stage_rst(0);
process(pc, rst, cop_stat)
proc_stage_reset:
process(clk_1)
begin begin
if rising_edge(clk_1) then
if rst = '1' then if rst = '1' then
pc.curr <= RESET_VECTOR after 2 ns; stage_rst <= (others => '1');
else else
if pc.is_branch and cop_stat.exc_pending = '0' then stage_rst <= stage_rst(stage_rst'left-1 downto 0) & '0';
end if;
end if;
end process;
proc_stage_pc:
process(pc)
begin
if pc.branch_take = '1' then
pc.curr <= pc.pc_branch after 2 ns; pc.curr <= pc.pc_branch after 2 ns;
else else
pc.curr <= pc.nxt after 2 ns; pc.curr <= pc.nxt after 2 ns;
end if; end if;
end if;
end process; end process;
proc_stage_pc_branch: proc_stage_pc_branch:
@@ -304,21 +272,28 @@ proc_stage_pc_branch:
end if; end if;
end process; end process;
proc_stage_branch_ce:
process(clk_1)
begin
if rising_edge(clk_1) then
if pipe_rst = '1' then
branch_ce <= '1';
else
branch_ce <= c0_ctrl_in.exc_pending;
if sdu.ID_stall = '0' and c0_ctrl_in.exc_inject = '0' then
branch_ce <= '1';
end if;
end if;
end if;
end process;
proc_stage_pc_next: proc_stage_pc_next:
process(clk_1) process(clk_1)
begin begin
if rising_edge(clk_1) then if rising_edge(clk_1) then
branch_ce <= '0'; if c0_ctrl_in.exc_inject = '1' then
cop_ctrl.exc_left <= '0'; pc.nxt <= c0_ctrl_in.exc_vec;
if rst = '1' then
pc.nxt <= pc.curr;
pc.last <= pc.curr;
else
if cop_stat.exc_commit = '1' then
pc.nxt <= cop_stat.exc_vec;
elsif sdu.ID_stall = '0' then elsif sdu.ID_stall = '0' then
cop_ctrl.exc_left <= cop_stat.exc_exit;
branch_ce <= '1';
pc.last <= pc.curr; pc.last <= pc.curr;
if ID_stage.ctrl.jump = '1' then if ID_stage.ctrl.jump = '1' then
pc.nxt <= ID_stage.jimm32; pc.nxt <= ID_stage.jimm32;
@@ -329,32 +304,25 @@ proc_stage_pc_next:
end if; end if;
end if; end if;
end if; end if;
end if;
end process; end process;
proc_stage_branch: proc_stage_branch:
process(clk_2) process(clk_2)
begin begin
if rising_edge(clk_2) and branch_ce = '1' then if rising_edge(clk_2) and branch_ce = '1' then
pc.is_branch <= false; pc.branch_take <= '0';
if EX_stage.ctrl.branch = '1' then if EX_stage.ctrl.branch = '1' then
case EX_stage.ctrl.bc_src is case EX_stage.ctrl.bc_src is
when bc_eq_ne => when bc_eq_ne =>
if (EX_stage.ctrl.bc_not xor bcu_flags.eq) = '1' then pc.branch_take <= EX_stage.ctrl.bc_not xor bcu_flags.eq;
pc.is_branch <= true;
end if;
when bc_lez_gtz => when bc_lez_gtz =>
if (EX_stage.ctrl.bc_not xor (bcu_flags.eq or bcu_flags.ltz)) = '1' then pc.branch_take <= EX_stage.ctrl.bc_not xor (bcu_flags.eq or bcu_flags.ltz);
pc.is_branch <= true;
end if;
when bc_ltz_gez => when bc_ltz_gez =>
if (EX_stage.ctrl.bc_not xor bcu_flags.ltz) = '1' then pc.branch_take <= EX_stage.ctrl.bc_not xor bcu_flags.ltz;
pc.is_branch <= true;
end if;
when others => null; when others => null;
end case; end case;
@@ -362,25 +330,6 @@ proc_stage_branch:
end if; end if;
end process; end process;
process(rst, clk_1)
variable reset_delay : unsigned (5 downto 0);
begin
if rising_edge(clk_1) then
if rst = '1' then
reset_delay := (others => '1');
cpu_rst <= '1';
run_en <= '0';
elsif reset_delay /= (5 downto 0 => '0') then
reset_delay := reset_delay - 1;
else
cpu_rst <= '0';
end if;
if reset_delay(reset_delay'left-1) = '0' then
run_en <= '1';
end if;
end if;
end process;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
-- ID stage -- ID stage
-------------------------------------------------------------------------- --------------------------------------------------------------------------
@@ -392,18 +341,18 @@ proc_stage_branch:
ID_stage.shamt <= extract_shamt(ID_stage.IR); ID_stage.shamt <= extract_shamt(ID_stage.IR);
ID_stage.reg_a_rptr <= extract_rs(ID_stage.IR); ID_stage.reg_a_rptr <= extract_rs(ID_stage.IR);
ID_stage.reg_b_rptr <= extract_rt(ID_stage.IR); ID_stage.reg_b_rptr <= extract_rt(ID_stage.IR);
ID_stage.ctrl <= ctrl_lines; ID_stage.ctrl <= opcode_ctrl_lines(ID_stage.IR) when sdu.ID_nop = '0' else ctrl_lines_default;
ID_stage.reg_write <= ID_stage.ctrl.reg_write or cop_stat.reg_write; ID_stage.reg_write <= ID_stage.ctrl.reg_write;
ID_stage.epc <= pc.last; ID_stage.epc <= pc.last;
ID_stage.exc <= event_is_active(ID_stage.events); -- Todo: works ID_stage.exc <= event_is_active(ID_stage.events); -- Todo: works
ID_stage.nop <= sdu.ID_nop; ID_stage.nop <= sdu.ID_nop;
proc_ID_except: proc_ID_except:
process(ID_stage, cop_stat, pc) process(ID_stage, c0_ctrl_in, pc)
begin begin
ID_stage.events <= events_clr; ID_stage.events <= events_clr;
ID_stage.events.inst_load_err <= pc.nxt(1) or pc.nxt(0); ID_stage.events.inst_load_err <= not c0_ctrl_in.exc_pending and (pc.nxt(1) or pc.nxt(0));
ID_stage.events.inst_priv_addr <= pc.nxt(word_t'left) and cop_stat.user_mode; ID_stage.events.inst_priv_addr <= not c0_ctrl_in.exc_pending and (pc.nxt(word_t'left) and c0_ctrl_in.user_mode);
end process; end process;
proc_stage_hdu: proc_stage_hdu:
@@ -489,14 +438,6 @@ proc_imm_mux:
end process; end process;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
inst_idecode_rom: idecode_rom
PORT MAP
(
nop => sdu.ID_nop,
inst_in => ID_stage.IR,
ctrl_out => ctrl_lines
);
inst_reg_dual: reg_dual inst_reg_dual: reg_dual
GENERIC MAP GENERIC MAP
( (
@@ -527,7 +468,7 @@ proc_stage_ID_EX_1:
process(clk_1) process(clk_1)
begin begin
if rising_edge(clk_1) then if rising_edge(clk_1) then
if rst = '1' then if stage_rst(1) = '1' then
EX_stage.op <= NOP; EX_stage.op <= NOP;
EX_stage.IR <= (others => '0'); EX_stage.IR <= (others => '0');
EX_stage.ctrl <= ctrl_lines_default; EX_stage.ctrl <= ctrl_lines_default;
@@ -545,13 +486,12 @@ proc_stage_ID_EX_1:
EX_stage.nop <= sdu.EX_nop; EX_stage.nop <= sdu.EX_nop;
EX_stage.IR <= ID_stage.IR; EX_stage.IR <= ID_stage.IR;
EX_stage.pcn <= ID_stage.pcn; EX_stage.pcn <= ID_stage.pcn;
EX_stage.epc <= ID_stage.epc;
if sdu.EX_nop = '1' then if sdu.EX_nop = '1' then
EX_stage.op <= NOP; EX_stage.op <= NOP;
EX_stage.IR <= (others => '0'); EX_stage.IR <= (others => '0');
EX_stage.ctrl <= ctrl_lines_default; EX_stage.ctrl <= ctrl_lines_default;
EX_stage.reg_write <= '0'; EX_stage.reg_write <= '0';
else
EX_stage.epc <= ID_stage.epc;
end if; end if;
end if; end if;
end if; end if;
@@ -586,7 +526,7 @@ proc_stage_EX_mem_except:
process(clk_1) process(clk_1)
begin begin
if rising_edge(clk_1) then if rising_edge(clk_1) then
if rst = '1' then if pipe_rst = '1' then
dmem_en <= '0'; dmem_en <= '0';
elsif sdu.EX_stall = '0' then elsif sdu.EX_stall = '0' then
EX_events_mem <= events_clr; EX_events_mem <= events_clr;
@@ -617,19 +557,23 @@ proc_stage_DMEM_ADDR:
if rising_edge(clk_1) then if rising_edge(clk_1) then
if sdu.EX_stall = '0' then if sdu.EX_stall = '0' then
EX_stage.va <= vaddr; EX_stage.va <= vaddr;
if cop_stat.RE = '1' then if c0_ctrl_in.EB = '1' then
if ID_stage.ctrl.word2_en = '0' then
EX_stage.pa_off <= not vaddr(1 downto 0); EX_stage.pa_off <= not vaddr(1 downto 0);
else
EX_stage.pa_off <= not vaddr(1) & vaddr(0);
end if;
else else
EX_stage.pa_off <= vaddr(1 downto 0); EX_stage.pa_off <= vaddr(1 downto 0);
end if; end if;
end if; end if;
end if; end if;
end process; end process;
dmem_be <= store_be(EX_stage.pa_off, EX_stage.ctrl.dmem_we, EX_stage.ctrl.word2_en, EX_stage.ctrl.word4_en, EX_stage.ctrl.align_left, EX_stage.ctrl.byte_en_byp) after 1 ns; dmem_src <= cop_din when EX_stage.ctrl.cop_instr_en = '1' else EX_stage.reg_b;
dmem_be <= store_be(EX_stage.pa_off, EX_stage.ctrl.dmem_en, EX_stage.ctrl.word2_en, EX_stage.ctrl.word4_en, EX_stage.ctrl.align_left, EX_stage.ctrl.shift_byp) after 1 ns;
dmem_we <= EX_stage.ctrl.dmem_we; dmem_we <= EX_stage.ctrl.dmem_we;
dmem_dout <= store_shift(EX_stage.reg_b, EX_stage.pa_off, EX_stage.ctrl.shift_offset, EX_stage.ctrl.shift_byp) after 1ns; dmem_dout <= store_shift(dmem_src, EX_stage.pa_off, EX_stage.ctrl.shift_offset, EX_stage.ctrl.shift_byp) after 1ns;
dmem_addr <= EX_stage.va; dmem_addr <= EX_stage.va;
cop_din <= EX_stage.reg_b;
EX_stage.events <= EX_events_instr or EX_events_mem or EX_events_alu or EX_stage.events_in; EX_stage.events <= EX_events_instr or EX_events_mem or EX_events_alu or EX_stage.events_in;
EX_stage.exc <= event_is_active(EX_stage.events); EX_stage.exc <= event_is_active(EX_stage.events);
@@ -783,7 +727,7 @@ proc_stage_MEM_n:
process(clk_1) process(clk_1)
begin begin
if rising_edge(clk_1) then if rising_edge(clk_1) then
if rst = '1' then if stage_rst(2) = '1' then
MEM_stage.op <= NOP; MEM_stage.op <= NOP;
MEM_stage.wreg_we <= '0'; MEM_stage.wreg_we <= '0';
MEM_stage.ctrl <= ctrl_lines_default; MEM_stage.ctrl <= ctrl_lines_default;
@@ -794,17 +738,25 @@ proc_stage_MEM_n:
MEM_stage.op <= EX_stage.op; MEM_stage.op <= EX_stage.op;
MEM_stage.wreg_we <= EX_stage.wreg_we; MEM_stage.wreg_we <= EX_stage.wreg_we;
MEM_stage.ctrl <= EX_stage.ctrl; MEM_stage.ctrl <= EX_stage.ctrl;
if EX_stage.ctrl.dmem_en = '1' then
MEM_stage.va <= EX_stage.va; MEM_stage.va <= EX_stage.va;
end if;
MEM_stage.pa_off <= EX_stage.pa_off; MEM_stage.pa_off <= EX_stage.pa_off;
MEM_stage.reg_wptr <= EX_stage.reg_wptr; MEM_stage.reg_wptr <= EX_stage.reg_wptr;
MEM_stage.nop <= sdu.MEM_nop; MEM_stage.nop <= sdu.MEM_nop;
if EX_stage.ctrl.dmem_en = '1' then if MEM_stage.reg_wptr = EX_stage.reg_wptr then
MEM_stage.ex_result <= EX_stage.reg_b; if (EX_stage.ctrl.dmem_en and MEM_stage.ctrl.dmem_en) = '1' then
else MEM_stage.ex_result <= MEM_stage.data;
MEM_stage.ex_result <= EX_stage.result;
if cop_stat.cop_read = '1' then
MEM_stage.ex_result <= cop_dout;
end if; end if;
else
MEM_stage.ex_result <= EX_stage.reg_b;
end if;
if EX_stage.ctrl.cop_instr_en = '1' then
if EX_stage.ctrl.cop_read = '1' then
MEM_stage.ex_result <= cop_din;
end if;
elsif EX_stage.ctrl.dmem_en = '0' then
MEM_stage.ex_result <= EX_stage.result;
end if; end if;
if sdu.MEM_nop = '1' then if sdu.MEM_nop = '1' then
MEM_stage.op <= NOP; MEM_stage.op <= NOP;
@@ -826,12 +778,12 @@ proc_stage_MEM_mux:
variable be : unsigned(3 downto 0); variable be : unsigned(3 downto 0);
begin begin
data := MEM_stage.ex_result; data := MEM_stage.ex_result;
be := load_be(MEM_stage.pa_off, MEM_stage.ctrl.align_left, MEM_stage.ctrl.byte_en_byp);
if MEM_stage.ctrl.reg_link = '1' then if MEM_stage.ctrl.reg_link = '1' then
data := MEM_stage.pcn + 4; data := MEM_stage.epc + 8;
elsif MEM_stage.ctrl.dmem_en = '1' then elsif MEM_stage.ctrl.dmem_en = '1' then
temp1 := load_shift(dmem_din, MEM_stage.pa_off, MEM_stage.ctrl.shift_offset, MEM_stage.ctrl.shift_byp); temp1 := load_shift(dmem_din, MEM_stage.pa_off, MEM_stage.ctrl.shift_offset, MEM_stage.ctrl.shift_byp);
temp2 := load_sign_ext(temp1, MEM_stage.ctrl.sign_ext_byp, MEM_stage.ctrl.load_signed, MEM_stage.ctrl.word2_en, MEM_stage.ctrl.word4_en); temp2 := load_sign_ext(temp1, MEM_stage.ctrl.sign_ext_byp, MEM_stage.ctrl.load_signed, MEM_stage.ctrl.word2_en, MEM_stage.ctrl.word4_en);
be := load_be(MEM_stage.pa_off, MEM_stage.ctrl.align_left, MEM_stage.ctrl.byte_en_byp);
if be(0) = '1' then if be(0) = '1' then
data(7 downto 0) := temp2(7 downto 0); data(7 downto 0) := temp2(7 downto 0);
end if; end if;
@@ -850,13 +802,14 @@ proc_stage_MEM_mux:
end process; end process;
proc_stage_MEM_except: proc_stage_MEM_except:
process(MEM_stage, int) process(MEM_stage, c0_ctrl_in)
begin begin
MEM_stage.events <= MEM_stage.events_in; MEM_stage.events <= MEM_stage.events_in;
MEM_stage.events.Int <= int; MEM_stage.events.Int <= c0_ctrl_in.int;
MEM_stage.events.NMI <= c0_ctrl_in.NMI;
end process; end process;
MEM_stage.exc <= cop_stat.int or event_is_active(MEM_stage.events_in); MEM_stage.exc <= event_is_active(MEM_stage.events);
-------------------------------------------------------------------------- --------------------------------------------------------------------------
-- WB stage -- WB stage
@@ -865,20 +818,29 @@ proc_stage_WB_p:
process(clk_1) process(clk_1)
begin begin
if rising_edge(clk_1) then if rising_edge(clk_1) then
if rst = '1' then if stage_rst(3) = '1' then
WB_stage.op <= NOP; WB_stage.op <= NOP;
WB_stage.wreg_we <= '0'; WB_stage.wreg_we <= '1';
WB_stage.reg_wptr <= (others => '0');
WB_stage.data <= (others => '0');
WB_stage.events <= events_clr;
elsif sdu.WB_stall = '0' then elsif sdu.WB_stall = '0' then
WB_stage.op <= MEM_stage.op; WB_stage.op <= MEM_stage.op;
WB_stage.wreg_we <= MEM_stage.wreg_we; WB_stage.wreg_we <= MEM_stage.wreg_we;
WB_stage.reg_wptr <= MEM_stage.reg_wptr; WB_stage.reg_wptr <= MEM_stage.reg_wptr;
WB_stage.data <= MEM_stage.data; WB_stage.data <= MEM_stage.data;
WB_stage.exc <= '0';
if sdu.stall_all = '0' then
WB_stage.exc <= MEM_stage.exc;
if MEM_stage.exc = '1' then
WB_stage.events <= MEM_stage.events;
end if;
end if;
WB_stage.nop <= sdu.WB_nop; WB_stage.nop <= sdu.WB_nop;
if sdu.WB_nop = '1' then if sdu.WB_nop = '1' then
WB_stage.op <= NOP; WB_stage.op <= NOP;
WB_stage.wreg_we <= '0'; WB_stage.wreg_we <= '0';
else else
WB_stage.epc <= MEM_stage.epc;
WB_stage.bd <= MEM_stage.ctrl.branch or MEM_stage.ctrl.jump or MEM_stage.ctrl.jump_long; -- Todo: works WB_stage.bd <= MEM_stage.ctrl.branch or MEM_stage.ctrl.jump or MEM_stage.ctrl.jump_long; -- Todo: works
end if; end if;
end if; end if;
+1 -10
View File
@@ -51,16 +51,7 @@ architecture Behavioral of reg_dual is
constant depth : integer := 2**addr_width; constant depth : integer := 2**addr_width;
type mem_t is array (0 to depth-1) of unsigned (data_width-1 downto 0); type mem_t is array (0 to depth-1) of unsigned (data_width-1 downto 0);
function mem_clear(depth : natural) return mem_t is signal reg_mem : mem_t;
variable result : mem_t;
begin
for i in 0 to depth-1 loop
result(i) := (others => '0');
end loop;
return result;
end mem_clear;
signal reg_mem : mem_t := mem_clear(depth);
begin begin
+32 -29
View File
@@ -49,7 +49,23 @@ architecture Behavioral of shifter is
signal sa_rnd : unsigned (4 downto 0); signal sa_rnd : unsigned (4 downto 0);
signal fill : std_logic; signal fill : std_logic;
type fill_mask_rom_t is array (0 to 2*data_width-1) of unsigned(data_width-1 downto 0);
-------------------------------------------------------------------------- --------------------------------------------------------------------------
function gen_fill_mask_rom(data_width : natural) return fill_mask_rom_t is
variable result : fill_mask_rom_t;
begin
result(0) := (data_width-1 downto 0 => '0');
for i in 1 to data_width-1 loop
result(i) := (data_width-1-i downto 0 => '0') & (i-1 downto 0 => '1');
end loop;
result(data_width) := (data_width-1 downto 0 => '0');
for i in 1 to data_width-1 loop
result(data_width+i) := (i-1 downto 0 => '1') & (data_width-1-i downto 0 => '0');
end loop;
return result;
end gen_fill_mask_rom;
function rot_stage(x : unsigned; en : std_logic; stage_num : natural) return unsigned is function rot_stage(x : unsigned; en : std_logic; stage_num : natural) return unsigned is
variable result : unsigned(x'range); variable result : unsigned(x'range);
constant sa : natural := 2**stage_num; constant sa : natural := 2**stage_num;
@@ -63,33 +79,10 @@ function rot_stage(x : unsigned; en : std_logic; stage_num : natural) return uns
end rot_stage; end rot_stage;
function rot_fill(x : unsigned; fill : std_logic; shift_right : std_logic; sa : natural) return unsigned is constant fill_mask_rom : fill_mask_rom_t := gen_fill_mask_rom(data_width);
variable result : unsigned(x'range) := (others => '0'); signal fill_mask : unsigned(data_width-1 downto 0);
variable j : integer; signal fill_mask_addr : unsigned(5 downto 0);
begin signal dout_filled : unsigned (data_width-1 downto 0);
if shift_right = '0' then
for i in 0 to x'left loop
if i >= sa then
result(i) := x(i);
else
result(i) := fill;
end if;
end loop;
else
j := x'left;
for i in 0 to x'left loop
if i < sa then
result(j) := fill;
else
result(j) := x(j);
end if;
j := j - 1;
end loop;
end if;
return result;
end rot_fill;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
begin begin
@@ -104,10 +97,20 @@ gen_rotate_right:
sa_rnd <= shift_ctrl.shamt_rnd; sa_rnd <= shift_ctrl.shamt_rnd;
fill <= shift_ctrl.shift_arith and din(data_width-1); fill <= shift_ctrl.shift_arith and din(data_width-1);
dout <= rot_fill(rot_data(5), fill, shift_ctrl.shift_right, to_integer(shift_ctrl.shamt_nrm)) after 5 ns; fill_mask_addr <= shift_ctrl.shift_right & shift_ctrl.shamt_nrm;
-- dout <= rot_data(5); fill_mask <= fill_mask_rom(to_integer(fill_mask_addr));
proc_fill_neu:
process(fill_mask, fill, rot_data(5))
begin
if fill = '1' then
dout_filled <= rot_data(5) or fill_mask;
else
dout_filled <= rot_data(5) and not fill_mask;
end if;
end process;
dout <= dout_filled after 5 ns;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
end Behavioral; end Behavioral;
+136 -18
View File
@@ -29,16 +29,26 @@ library work;
use work.mips_types.all; use work.mips_types.all;
entity mips_top is entity mips_top is
Generic
(
icache_size : natural := 8192; -- words
icache_line : natural := 8; -- words
dcache_size : natural := 4096; -- words
dcache_line : natural := 8 -- words
);
Port Port
( (
debug : out unsigned(1 downto 0); debug : out unsigned(1 downto 0);
eb : in STD_LOGIC;
nmi : in STD_LOGIC;
cpu_clk : in STD_LOGIC;
RST_I : in STD_LOGIC; RST_I : in STD_LOGIC;
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out unsigned(31 downto 0);
DAT_I : in word_t; DAT_I : in unsigned(31 downto 0);
DAT_O : out word_t; DAT_O : out unsigned(31 downto 0);
WE_O : out STD_LOGIC; WE_O : out STD_LOGIC;
SEL_O : out unsigned(3 downto 0); SEL_O : out unsigned(3 downto 0);
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
@@ -51,13 +61,15 @@ end mips_top;
architecture rtl of mips_top is architecture rtl of mips_top is
--------------------------------------------------------------------------
-- Pipeline
--------------------------------------------------------------------------
COMPONENT pipeline is COMPONENT pipeline is
Port Port
( (
rst : in STD_LOGIC; rst : in STD_LOGIC;
clk : in STD_LOGIC; clk : in STD_LOGIC;
halt : in STD_LOGIC; ce : in STD_LOGIC;
int : in unsigned (5 downto 0);
imem_err : in STD_LOGIC; imem_err : in STD_LOGIC;
imem_rdy : in STD_LOGIC; imem_rdy : in STD_LOGIC;
imem_en : out STD_LOGIC; imem_en : out STD_LOGIC;
@@ -70,7 +82,13 @@ architecture rtl of mips_top is
dmem_be : out unsigned(3 downto 0); dmem_be : out unsigned(3 downto 0);
dmem_addr : out word_t; dmem_addr : out word_t;
dmem_din : in word_t; dmem_din : in word_t;
dmem_dout : out word_t dmem_dout : out word_t;
cop_ir : out word_t;
cop_ir_en : out STD_LOGIC;
cop_din : in word_t;
cop_dout : out word_t;
c0_ctrl_out : out cop0_ctrl_in_t;
c0_ctrl_in : in cop0_ctrl_out_t
); );
END COMPONENT; END COMPONENT;
signal imem_err : std_logic; signal imem_err : std_logic;
@@ -87,12 +105,54 @@ architecture rtl of mips_top is
signal dmem_din : word_t; signal dmem_din : word_t;
signal dmem_be : unsigned(3 downto 0); signal dmem_be : unsigned(3 downto 0);
signal biu_rst : STD_LOGIC;
signal cpu_rst : STD_LOGIC;
signal cpu_run : STD_LOGIC;
signal pipe_cop_ir : word_t;
signal pipe_cop_ir_en : STD_LOGIC;
signal pipe_cop_din : word_t;
signal pipe_cop_dout : word_t;
signal pipe_c0_ctrl_out : cop0_ctrl_in_t;
signal pipe_c0_ctrl_in : cop0_ctrl_out_t;
--------------------------------------------------------------------------
-- Coprocessor
--------------------------------------------------------------------------
COMPONENT cop is
GENERIC
(
icache_size : natural;
icache_line : natural;
dcache_size : natural;
dcache_line : natural
);
Port
(
rst : in STD_LOGIC;
clk : in STD_LOGIC;
nmi : in STD_LOGIC;
eb : in STD_LOGIC;
int : in unsigned (5 downto 0);
ir_en : in STD_LOGIC;
ir : in word_t;
ctrl_in : in cop0_ctrl_in_t;
ctrl_out : out cop0_ctrl_out_t;
din : in word_t;
dout : out word_t
);
END COMPONENT;
--------------------------------------------------------------------------
-- Bus Interface Unit
--------------------------------------------------------------------------
COMPONENT biu COMPONENT biu
GENERIC GENERIC
( (
icache_size : natural; icache_size : natural;
dcache_size : natural icache_line : natural;
dcache_size : natural;
dcache_line : natural
); );
PORT PORT
( (
@@ -100,14 +160,16 @@ architecture rtl of mips_top is
CLK_I : in STD_LOGIC; CLK_I : in STD_LOGIC;
ACK_I : in STD_LOGIC; ACK_I : in STD_LOGIC;
SRDY_I : in STD_LOGIC; SRDY_I : in STD_LOGIC;
ADDR_O : out word_t; ADDR_O : out unsigned(31 downto 0);
DAT_I : in word_t; DAT_I : in unsigned(31 downto 0);
DAT_O : out word_t; DAT_O : out unsigned(31 downto 0);
WE_O : out STD_LOGIC; WE_O : out STD_LOGIC;
SEL_O : out unsigned(3 downto 0); SEL_O : out unsigned(3 downto 0);
CYC_O : out STD_LOGIC; CYC_O : out STD_LOGIC;
STB_O : out STD_LOGIC; STB_O : out STD_LOGIC;
MRDY_O : out STD_LOGIC; MRDY_O : out STD_LOGIC;
cop0_ctrl_in : in cop0_ctrl_out_t;
cpu_clk : in STD_LOGIC;
cpu_imem_err : out STD_LOGIC; cpu_imem_err : out STD_LOGIC;
cpu_imem_rdy : out STD_LOGIC; cpu_imem_rdy : out STD_LOGIC;
cpu_imem_en : in STD_LOGIC; cpu_imem_en : in STD_LOGIC;
@@ -130,13 +192,36 @@ begin
debug(0) <= imem_err; debug(0) <= imem_err;
debug(1) <= dmem_err; debug(1) <= dmem_err;
process(CLK_I)
variable reset_delay : unsigned (31 downto 0);
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
reset_delay := (others => '0');
biu_rst <= '1';
cpu_rst <= '1';
cpu_run <= '0';
else
reset_delay := reset_delay(reset_delay'left-1 downto 0) & '1';
if reset_delay(20) = '1' then
biu_rst <= '0';
end if;
if reset_delay(31) = '1' then
cpu_rst <= '0';
end if;
if reset_delay(16) = '1' then
cpu_run <= '1';
end if;
end if;
end if;
end process;
inst_pipeline: pipeline inst_pipeline: pipeline
PORT MAP PORT MAP
( (
rst => RST_I, rst => cpu_rst,
clk => CLK_I, clk => cpu_clk,
halt => '0', ce => cpu_run,
int => INT,
imem_err => imem_err, imem_err => imem_err,
imem_rdy => imem_rdy, imem_rdy => imem_rdy,
imem_en => imem_en, imem_en => imem_en,
@@ -149,18 +234,49 @@ inst_pipeline: pipeline
dmem_be => dmem_be, dmem_be => dmem_be,
dmem_addr => dmem_addr, dmem_addr => dmem_addr,
dmem_din => dmem_din, dmem_din => dmem_din,
dmem_dout => dmem_dout dmem_dout => dmem_dout,
cop_ir => pipe_cop_ir,
cop_ir_en => pipe_cop_ir_en,
cop_din => pipe_cop_din,
cop_dout => pipe_cop_dout,
c0_ctrl_out => pipe_c0_ctrl_out,
c0_ctrl_in => pipe_c0_ctrl_in
);
inst_cop: cop
GENERIC MAP
(
icache_size => icache_size, -- words
icache_line => icache_line, -- words
dcache_size => dcache_size, -- words
dcache_line => dcache_line -- words
)
PORT MAP
(
rst => cpu_rst,
clk => cpu_clk,
nmi => nmi,
eb => eb,
int => INT,
ir_en => pipe_cop_ir_en,
ir => pipe_cop_ir,
ctrl_in => pipe_c0_ctrl_out,
ctrl_out => pipe_c0_ctrl_in,
dout => pipe_cop_din,
din => pipe_cop_dout
); );
inst_biu: biu inst_biu: biu
GENERIC MAP GENERIC MAP
( (
icache_size => 4096, -- words icache_size => icache_size, -- words
dcache_size => 4096 -- words icache_line => icache_line, -- words
dcache_size => dcache_size, -- words
dcache_line => dcache_line -- words
) )
PORT MAP PORT MAP
( (
RST_I => RST_I, RST_I => biu_rst,
CLK_I => CLK_I, CLK_I => CLK_I,
ACK_I => ACK_I, ACK_I => ACK_I,
SRDY_I => SRDY_I, SRDY_I => SRDY_I,
@@ -172,6 +288,8 @@ inst_biu: biu
CYC_O => CYC_O, CYC_O => CYC_O,
STB_O => STB_O, STB_O => STB_O,
MRDY_O => MRDY_O, MRDY_O => MRDY_O,
cop0_ctrl_in => pipe_c0_ctrl_in,
cpu_clk => cpu_clk,
cpu_imem_err => imem_err, cpu_imem_err => imem_err,
cpu_imem_rdy => imem_rdy, cpu_imem_rdy => imem_rdy,
cpu_imem_en => imem_en, cpu_imem_en => imem_en,
+114 -63
View File
@@ -23,14 +23,14 @@
library IEEE; library IEEE;
use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL; use IEEE.NUMERIC_STD.ALL;
use IEEE.MATH_REAL.ALL;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
package mips_types is package mips_types is
-- Revision of the CPU -- Revision of the CPU
constant REVISION : integer := 9; constant REVISION : integer := 13;
constant WORD_WIDTH : integer := 32; constant WORD_WIDTH : integer := 32;
--Types --Types
@@ -43,10 +43,9 @@ package mips_types is
subtype sa_t is natural range 0 to 63; subtype sa_t is natural range 0 to 63;
subtype func_t is unsigned(5 downto 0); subtype func_t is unsigned(5 downto 0);
type opclass_t is (special, regimm, opcode);
type op_t is type op_t is
( (
reserved,
nop, nop,
op_sll, op_sll,
op_srl, op_srl,
@@ -110,9 +109,35 @@ package mips_types is
op_cop1, op_cop1,
op_cop2, op_cop2,
op_cop3, op_cop3,
op_mfc0,
op_cfc0,
op_mtc0,
op_ctc0,
op_bcf0,
op_bct0,
op_mfc1,
op_cfc1,
op_mtc1,
op_ctc1,
op_bcf1,
op_bct1,
op_mfc2,
op_cfc2,
op_mtc2,
op_ctc2,
op_bcf2,
op_bct2,
op_mfc3,
op_cfc3,
op_mtc3,
op_ctc3,
op_bcf3,
op_bct3,
op_lwc0,
op_lwc1, op_lwc1,
op_lwc2, op_lwc2,
op_lwc3, op_lwc3,
op_swc0,
op_swc1, op_swc1,
op_swc2, op_swc2,
op_swc3 op_swc3
@@ -135,7 +160,7 @@ package mips_types is
last : word_t; last : word_t;
nxt : word_t; nxt : word_t;
pc_branch : word_t; pc_branch : word_t;
is_branch : boolean; branch_take : std_logic;
end record; end record;
type alu_outsel_t is type alu_outsel_t is
@@ -150,6 +175,30 @@ package mips_types is
alu_lts alu_lts
); );
type sdu_t is record
imem_dep : STD_LOGIC;
dmem_dep : STD_LOGIC;
mul_dep : STD_LOGIC;
ID_nop : STD_LOGIC;
EX_nop : STD_LOGIC;
MEM_nop : STD_LOGIC;
WB_nop : STD_LOGIC;
ID_stall : STD_LOGIC;
EX_stall : STD_LOGIC;
MEM_stall : STD_LOGIC;
WB_stall : STD_LOGIC;
stall_all : STD_LOGIC;
end record;
type hdu_t is record
alu_fwd_a_ex : boolean;
alu_fwd_a_mem : boolean;
alu_fwd_a_wb : boolean;
alu_fwd_b_ex : boolean;
alu_fwd_b_mem : boolean;
alu_fwd_b_wb : boolean;
end record;
type alu_flags_t is record type alu_flags_t is record
c : STD_LOGIC; c : STD_LOGIC;
uvf : STD_LOGIC; uvf : STD_LOGIC;
@@ -164,7 +213,8 @@ package mips_types is
end record; end record;
type event_t is record type event_t is record
Int : unsigned(5 downto 0); NMI : STD_LOGIC;
Int : STD_LOGIC;
data_load_err : STD_LOGIC; data_load_err : STD_LOGIC;
data_store_err : STD_LOGIC; data_store_err : STD_LOGIC;
inst_load_err : STD_LOGIC; inst_load_err : STD_LOGIC;
@@ -196,47 +246,36 @@ package mips_types is
cause : word_t; cause : word_t;
end record; end record;
type cop_ctrl_in_t is record type cache_ctrl_t is record
inv_addr : word_t;
inv_at : STD_LOGIC;
inv_all : STD_LOGIC;
end record;
type cop0_ctrl_in_t is record
sdu : sdu_t;
events : event_t;
bd_wb : STD_LOGIC; bd_wb : STD_LOGIC;
epc_mem : word_t; epc_mem : word_t;
epc_wb : word_t; epc_wb : word_t;
imem_addr : word_t; imem_addr : word_t;
dmem_addr : word_t; dmem_addr : word_t;
exc_left : STD_LOGIC; exc_req : STD_LOGIC;
exc_ack : STD_LOGIC;
end record; end record;
type cop_ctrl_out_t is record type cop0_ctrl_out_t is record
RE : STD_LOGIC; EB : STD_LOGIC;
ee : STD_LOGIC; exc_inject : STD_LOGIC;
ec : STD_LOGIC;
exc_commit : STD_LOGIC; exc_commit : STD_LOGIC;
exc_pending : STD_LOGIC; exc_pending : STD_LOGIC;
exc_exit : STD_LOGIC; exc_exit : STD_LOGIC;
reg_write : STD_LOGIC;
cop_read : STD_LOGIC;
user_mode : STD_LOGIC; user_mode : STD_LOGIC;
NMI : STD_LOGIC;
int : STD_LOGIC; int : STD_LOGIC;
exc_vec : word_t; exc_vec : word_t;
end record; icache : cache_ctrl_t;
dcache : cache_ctrl_t;
type sdu_t is record
ID_nop : STD_LOGIC;
EX_nop : STD_LOGIC;
MEM_nop : STD_LOGIC;
WB_nop : STD_LOGIC;
ID_stall : STD_LOGIC;
EX_stall : STD_LOGIC;
MEM_stall : STD_LOGIC;
WB_stall : STD_LOGIC;
end record;
type hdu_t is record
alu_fwd_a_ex : boolean;
alu_fwd_a_mem : boolean;
alu_fwd_a_wb : boolean;
alu_fwd_b_ex : boolean;
alu_fwd_b_mem : boolean;
alu_fwd_b_wb : boolean;
end record; end record;
type alu_ctrl_t is record type alu_ctrl_t is record
@@ -270,6 +309,7 @@ package mips_types is
shamt2_srcsel : sa_src_t; shamt2_srcsel : sa_src_t;
wptr_srcsel : wptr_src_t; wptr_srcsel : wptr_src_t;
cop_instr_en : STD_LOGIC; cop_instr_en : STD_LOGIC;
cop_read : STD_LOGIC;
shift_offset : unsigned(1 downto 0); shift_offset : unsigned(1 downto 0);
shift_byp : STD_LOGIC; shift_byp : STD_LOGIC;
byte_en_byp : STD_LOGIC; byte_en_byp : STD_LOGIC;
@@ -357,8 +397,9 @@ package mips_types is
type WB_t is record type WB_t is record
nop : STD_LOGIC; nop : STD_LOGIC;
exc : std_logic;
events : event_t;
op : op_t; op : op_t;
epc : word_t;
reg_wptr : reg_ptr_t; reg_wptr : reg_ptr_t;
wreg_we : STD_LOGIC; wreg_we : STD_LOGIC;
data : word_t; data : word_t;
@@ -379,6 +420,9 @@ package mips_types is
function event_is_active(e : event_t) return std_logic; function event_is_active(e : event_t) return std_logic;
function "or" (a, b : event_t) return event_t; function "or" (a, b : event_t) return event_t;
function lg2(x : natural) return natural;
function po2(x : natural) return natural;
end mips_types; end mips_types;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
@@ -412,16 +456,15 @@ package body mips_types is
function store_be(va : unsigned(1 downto 0); be_src, word2_en, word4_en, align_left, bypass : std_logic) return unsigned is function store_be(va : unsigned(1 downto 0); be_src, word2_en, word4_en, align_left, bypass : std_logic) return unsigned is
variable result : unsigned(3 downto 0); variable result : unsigned(3 downto 0);
begin begin
if bypass = '1' then
result := (3 downto 0 => be_src); result := (3 downto 0 => be_src);
elsif word2_en = '1' then if bypass = '0' then
if word2_en = '1' then
case va is case va is
when "00" | "01" => when "00" =>
result := "00" & be_src & be_src; result := "00" & be_src & be_src;
when "10" | "11" => when "10" =>
result := be_src & be_src & "00"; result := be_src & be_src & "00";
when others => when others => null;
result := "0000";
end case; end case;
elsif word4_en = '1' then elsif word4_en = '1' then
case va is case va is
@@ -433,8 +476,7 @@ package body mips_types is
result := '0' & be_src & "00"; result := '0' & be_src & "00";
when "11" => when "11" =>
result := be_src & "000"; result := be_src & "000";
when others => when others => null;
result := "0000";
end case; end case;
elsif align_left = '1' then elsif align_left = '1' then
case va is case va is
@@ -446,8 +488,7 @@ package body mips_types is
result := be_src & be_src & "00"; result := be_src & be_src & "00";
when "11" => when "11" =>
result := be_src & "000"; result := be_src & "000";
when others => when others => null;
result := "0000";
end case; end case;
else else
case va is case va is
@@ -459,10 +500,10 @@ package body mips_types is
result := '0' & be_src & be_src & be_src; result := '0' & be_src & be_src & be_src;
when "11" => when "11" =>
result := be_src & be_src & be_src & be_src; result := be_src & be_src & be_src & be_src;
when others => when others => null;
result := "0000";
end case; end case;
end if; end if;
end if;
return result; return result;
@@ -497,9 +538,9 @@ package body mips_types is
function load_be(va : unsigned(1 downto 0); align_left, bypass : std_logic) return unsigned is function load_be(va : unsigned(1 downto 0); align_left, bypass : std_logic) return unsigned is
variable result : unsigned(3 downto 0); variable result : unsigned(3 downto 0);
begin begin
if bypass = '1' then
result := (3 downto 0 => '1'); result := (3 downto 0 => '1');
elsif align_left = '1' then if bypass = '0' then
if align_left = '1' then
case va is case va is
when "00" => when "00" =>
result := "1000"; result := "1000";
@@ -509,8 +550,7 @@ package body mips_types is
result := "1110"; result := "1110";
when "11" => when "11" =>
result := "1111"; result := "1111";
when others => when others => null;
result := "0000";
end case; end case;
else else
case va is case va is
@@ -522,10 +562,10 @@ package body mips_types is
result := "0011"; result := "0011";
when "11" => when "11" =>
result := "0001"; result := "0001";
when others => when others => null;
result := "0000";
end case; end case;
end if; end if;
end if;
return result; return result;
@@ -554,7 +594,8 @@ package body mips_types is
function events_clr return event_t is function events_clr return event_t is
variable result : event_t; variable result : event_t;
begin begin
result.Int := (others => '0'); result.NMI := '0';
result.Int := '0';
result.data_load_err := '0'; result.data_load_err := '0';
result.data_store_err := '0'; result.data_store_err := '0';
result.inst_load_err := '0'; result.inst_load_err := '0';
@@ -569,15 +610,14 @@ package body mips_types is
end events_clr; end events_clr;
--------------------------------------------------------------------------
function event_is_active(e : event_t) return std_logic is function event_is_active(e : event_t) return std_logic is
variable result : std_logic; variable result : std_logic;
begin begin
result := '0'; result := '0';
for i in e.Int'range loop result := result or e.NMI;
result := result or e.Int(i); result := result or e.Int;
end loop;
result := result or e.data_load_err; result := result or e.data_load_err;
result := result or e.data_store_err; result := result or e.data_store_err;
result := result or e.inst_load_err; result := result or e.inst_load_err;
@@ -592,12 +632,12 @@ package body mips_types is
end event_is_active; end event_is_active;
--------------------------------------------------------------------------
function "or" (a, b : event_t) return event_t is function "or" (a, b : event_t) return event_t is
variable result : event_t; variable result : event_t;
begin begin
for i in a.Int'range loop result.NMI := a.NMI or b.NMI;
result.Int(i) := a.Int(i) or b.Int(i); result.Int := a.Int or b.Int;
end loop;
result.data_load_err := a.data_load_err or b.data_load_err; result.data_load_err := a.data_load_err or b.data_load_err;
result.data_store_err := a.data_store_err or b.data_store_err; result.data_store_err := a.data_store_err or b.data_store_err;
result.inst_load_err := a.inst_load_err or b.inst_load_err; result.inst_load_err := a.inst_load_err or b.inst_load_err;
@@ -613,7 +653,18 @@ package body mips_types is
end "or"; end "or";
-------------------------------------------------------------------------- --------------------------------------------------------------------------
end mips_types; function lg2(x : natural) return natural is
begin
return natural(ceil(log2(real(x))));
end lg2;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
function po2(x : natural) return natural is
begin
return 2**lg2(x);
end po2;
-------------------------------------------------------------------------- --------------------------------------------------------------------------
end mips_types;
@@ -32,25 +32,53 @@ use work.mips_instr.all;
use work.async_types.all; use work.async_types.all;
use work.async_defs.all; use work.async_defs.all;
ENTITY tb_mips_top IS ENTITY mips_sys IS
END tb_mips_top; GENERIC
(
ICACHE_SIZE : natural := 512; -- words
DCACHE_SIZE : natural := 512; -- words
SRAM_ADDR_WIDTH : integer := 14;
FLASH_ADDR_WIDTH : integer := 14
);
PORT
(
eb : in std_logic;
nmi : in std_logic;
rst : in std_logic;
clk : in std_logic;
flash_cs_n : out std_logic;
flash_oe_n : out std_logic;
flash_we_n : out std_logic;
flash_be_n : out unsigned(3 downto 0);
sram_cs_n : out std_logic;
sram_we_n : out std_logic;
sram_oe_n : out std_logic;
sram_be_n : out unsigned(3 downto 0);
sram_a : out unsigned(SRAM_ADDR_WIDTH-1 downto 0);
sram_d : inout unsigned(31 downto 0);
flash_a : out unsigned(FLASH_ADDR_WIDTH-1 downto 0);
flash_d : inout unsigned(31 downto 0);
ARCHITECTURE behavior OF tb_mips_top IS gpo0 : out unsigned(31 downto 0);
gpo1 : out unsigned(31 downto 0);
gpi0 : in unsigned(31 downto 0);
gpi1 : in unsigned(31 downto 0);
constant CLK_PERIOD : time := 10 ns; rx : in std_logic;
constant SRAM_ADDR_WIDTH : integer := 14; -- bits tx : out std_logic;
constant FLASH_ADDR_WIDTH : integer := 14; -- bits
signal debug : unsigned(1 downto 0); debug : out unsigned(1 downto 0)
);
END mips_sys;
ARCHITECTURE behavior OF mips_sys IS
-- Master -- Master
signal rst : STD_LOGIC := '1';
signal clk : STD_LOGIC := '0';
signal ACK_I : STD_LOGIC := '0'; signal ACK_I : STD_LOGIC := '0';
signal SRDY_I : STD_LOGIC := '0'; signal SRDY_I : STD_LOGIC := '0';
signal ADDR_O : word_t; signal ADDR_O : unsigned(31 downto 0);
signal DAT_I : word_t := (others => '0'); signal DAT_I : unsigned(31 downto 0) := (others => '0');
signal DAT_O : word_t; signal DAT_O : unsigned(31 downto 0);
signal WE_O : STD_LOGIC; signal WE_O : STD_LOGIC;
signal SEL_O : unsigned(3 downto 0); signal SEL_O : unsigned(3 downto 0);
signal CYC_O : STD_LOGIC; signal CYC_O : STD_LOGIC;
@@ -84,41 +112,14 @@ ARCHITECTURE behavior OF tb_mips_top IS
signal SRDY_O_uart : std_logic; signal SRDY_O_uart : std_logic;
signal DAT_O_uart : unsigned(31 downto 0); signal DAT_O_uart : unsigned(31 downto 0);
signal flash_cs_n : std_logic; signal int_timer : std_logic;
signal flash_oe_n : std_logic; signal int_uart : std_logic;
signal sram_cs_n : std_logic;
signal sram_wr_n : unsigned(3 downto 0);
signal sram_oe_n : std_logic;
signal sram_a : unsigned(SRAM_ADDR_WIDTH-1 downto 0);
signal sram_d : unsigned(31 downto 0);
signal flash_a : unsigned(FLASH_ADDR_WIDTH-1 downto 0);
signal flash_d : unsigned(31 downto 0);
signal gpo0 : unsigned(31 downto 0);
signal gpo1 : unsigned(31 downto 0);
signal gpi0 : unsigned(31 downto 0) := (others => '0');
signal gpi1 : unsigned(31 downto 0) := (others => '0');
signal int_uart_rx : std_logic;
signal rx : std_logic := '1';
signal tx : std_logic;
type mem_area_t is (mem_dead, mem_flash, mem_sram, mem_rom, mem_gpio, mem_uart); type mem_area_t is (mem_dead, mem_flash, mem_sram, mem_rom, mem_gpio, mem_uart);
signal mem_area : mem_area_t; signal mem_area : mem_area_t;
type word_array_t is array (natural range <>) of word_t;
signal sram_data : word_array_t(0 to 2**SRAM_ADDR_WIDTH-1);
signal flash_data : word_array_t(0 to 2**FLASH_ADDR_WIDTH-1);
BEGIN BEGIN
------------------------------------------------------------------
CLK_GEN: process
begin
wait for CLK_PERIOD/2;
clk <= not clk;
end process;
------------------------------------------------------------------ ------------------------------------------------------------------
-- Memory mux -- Memory mux
------------------------------------------------------------------ ------------------------------------------------------------------
@@ -188,10 +189,18 @@ signal_mux:
------------------------------------------------------------------ ------------------------------------------------------------------
uut: entity work.mips_top inst_mips_top: entity work.mips_top
GENERIC MAP
(
icache_size => ICACHE_SIZE, -- words
dcache_size => DCACHE_SIZE -- words
)
PORT MAP PORT MAP
( (
debug => debug, debug => debug,
nmi => nmi,
eb => eb,
cpu_clk => clk,
RST_I => rst, RST_I => rst,
CLK_I => clk, CLK_I => clk,
ACK_I => ACK_I, ACK_I => ACK_I,
@@ -206,7 +215,8 @@ uut: entity work.mips_top
MRDY_O => MRDY_O, MRDY_O => MRDY_O,
INT => INT INT => INT
); );
INT(1) <= int_uart_rx; INT(1) <= int_uart;
INT(5) <= int_timer;
inst_rom : entity work.rom_wb inst_rom : entity work.rom_wb
PORT MAP PORT MAP
@@ -237,7 +247,7 @@ inst_gpio : entity work.gpio_wb
ADDR_I => ADDR_O, ADDR_I => ADDR_O,
DAT_I => DAT_O, DAT_I => DAT_O,
DAT_O => DAT_O_gpio, DAT_O => DAT_O_gpio,
INT_TIM_O => int_timer,
sys_gpo0 => gpo0, sys_gpo0 => gpo0,
sys_gpo1 => gpo1, sys_gpo1 => gpo1,
sys_gpi0 => gpi0, sys_gpi0 => gpi0,
@@ -249,7 +259,7 @@ inst_flash_port : entity work.async_port_wb
( (
addr_width => FLASH_ADDR_WIDTH, addr_width => FLASH_ADDR_WIDTH,
data_width => 32, data_width => 32,
byte_sel_width => 1, byte_sel_width => 4,
async_timespec => ts_flash async_timespec => ts_flash
) )
PORT MAP PORT MAP
@@ -266,11 +276,13 @@ inst_flash_port : entity work.async_port_wb
ADDR_I => ADDR_O, ADDR_I => ADDR_O,
DAT_I => DAT_O, DAT_I => DAT_O,
DAT_O => DAT_O_flash, DAT_O => DAT_O_flash,
page_mode_en => '0',
async_a => flash_a, async_a => flash_a,
async_d => flash_d, async_d => flash_d,
async_cs => flash_cs_n, async_cs => flash_cs_n,
async_wr => open, async_wr => flash_we_n,
async_rd => flash_oe_n, async_rd => flash_oe_n,
async_be => flash_be_n,
async_rst => open async_rst => open
); );
@@ -296,11 +308,13 @@ inst_sram_port : entity work.async_port_wb
ADDR_I => ADDR_O, ADDR_I => ADDR_O,
DAT_I => DAT_O, DAT_I => DAT_O,
DAT_O => DAT_O_sram, DAT_O => DAT_O_sram,
page_mode_en => '0',
async_a => sram_a, async_a => sram_a,
async_d => sram_d, async_d => sram_d,
async_cs => sram_cs_n, async_cs => sram_cs_n,
async_wr => sram_wr_n, async_wr => sram_we_n,
async_rd => sram_oe_n, async_rd => sram_oe_n,
async_be => sram_be_n,
async_rst => open async_rst => open
); );
@@ -319,87 +333,9 @@ inst_uart : entity work.uart_wb
ADDR_I => ADDR_O, ADDR_I => ADDR_O,
DAT_I => DAT_O, DAT_I => DAT_O,
DAT_O => DAT_O_uart, DAT_O => DAT_O_uart,
INT_RX_O => int_uart_rx, INT_O => int_uart,
INT_TX_O => open,
ser_rx => rx, ser_rx => rx,
ser_tx => tx ser_tx => tx
); );
------------------------------------------------------------------
SRAM_READ:
process(sram_a, sram_cs_n, sram_oe_n)
begin
sram_d <= (others => 'Z');
if sram_oe_n = '0' then
if sram_cs_n = '0' then
sram_d <= sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)));
end if;
end if;
end process;
SRAM_WRITE:
process(sram_a, sram_cs_n, sram_wr_n)
begin
if rising_edge(sram_wr_n(0)) then
if sram_cs_n = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(7 downto 0) <= sram_d(7 downto 0);
end if;
end if;
if rising_edge(sram_wr_n(1)) then
if sram_cs_n = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(15 downto 8) <= sram_d(15 downto 8);
end if;
end if;
if rising_edge(sram_wr_n(2)) then
if sram_cs_n = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(23 downto 16) <= sram_d(23 downto 16);
end if;
end if;
if rising_edge(sram_wr_n(3)) then
if sram_cs_n = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(31 downto 24) <= sram_d(31 downto 24);
end if;
end if;
end process;
------------------------------------------------------------------
FLASH_READ:
process(rst, flash_cs_n, flash_oe_n, flash_a)
type file_t is file of integer;
file load_flash : file_t open read_mode is "hello.flash.bin";
variable instr : integer;
variable index : natural;
variable temp : signed(31 downto 0);
begin
if rst = '1' then
index := 0;
while not endfile(load_flash) loop
read(load_flash, instr);
temp := to_signed(instr, word_t'length);
flash_data(index) <= unsigned(temp);
index := index + 1;
end loop;
else
flash_d <= (others => 'Z') after 10 ns;
if flash_oe_n = '0' and flash_cs_n = '0' then
index := to_integer(flash_a(FLASH_ADDR_WIDTH-1 downto 2));
flash_d <= flash_data(index) after 10 ns;
end if;
end if;
end process;
------------------------------------------------------------------
STIMULUS: process
begin
wait for 3*CLK_PERIOD;
wait until rising_edge(clk);
rst <= '0';
wait;
end process;
END; END;
-332
View File
@@ -1,332 +0,0 @@
-------------------------------------------------------------------------
-- Project: JIPS, a portable 32-bit RISC CPU written in VHDL
-- This file: Testbench for JCPU
-- also writes 'opc.lst' for JASM-assembler
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
--------------------------------------------------------------------------
LIBRARY ieee;
use IEEE.STD_LOGIC_1164.ALL;
USE ieee.numeric_std.ALL;
library work;
use work.mips_types.all;
use work.mips_instr.all;
ENTITY tb_mips_muldiv IS
END tb_mips_muldiv;
ARCHITECTURE behavior OF tb_mips_muldiv IS
COMPONENT muldiv is
Port
(
rst : in std_logic;
clk : in std_logic;
hilo_we : in std_logic;
din_hi : in word_t;
din_lo : in word_t;
mul_divn : in std_logic;
s_un : in std_logic;
start : in std_logic;
hilo_sel : in std_logic;
busy : out std_logic;
dout : out word_t
);
END COMPONENT;
constant CLK_PERIOD : time := 10 ns;
signal ENABLE_FAIL_REPORT : boolean := true;
signal rst : std_logic := '1';
signal clk : std_logic := '1';
signal busy : std_logic;
signal mul_divn : std_logic := '0';
signal s_un : std_logic := '1';
signal hilo_we : std_logic := '0';
signal start : std_logic := '0';
signal din_hi : word_t := (others => '-');
signal din_lo : word_t := (others => '-');
signal dout : word_t;
signal hilo_sel : std_logic := '0';
signal md_result : unsigned (2*word_t'length-1 downto 0) := (others => '0');
signal ref_result : unsigned (2*word_t'length-1 downto 0);
signal ref_hi : unsigned (word_t'length-1 downto 0);
signal rtmp : unsigned (2*word_t'length-1 downto 0);
signal tmp2 : unsigned (word_t'length-1 downto 0);
signal check : std_logic;
type word_array_t is array (natural range <>) of word_t;
constant operands : word_array_t(0 to 63) :=
(
X"00000000",
X"00000001",
X"00000010",
X"00000100",
X"00001000",
X"00010000",
X"00100000",
X"01000000",
X"10000000",
X"0000000F",
X"000000FF",
X"00000FFF",
X"0000FFFF",
X"000FFFFF",
X"00FFFFFF",
X"0FFFFFFF",
X"12345678",
X"23456789",
X"7FFFFFFF",
X"80000000",
X"A541B3B9",
X"80000001",
X"80000010",
X"80000100",
X"80001000",
X"80010000",
X"80100000",
X"81000000",
X"87654321",
X"98765432",
X"FFFFFFFF",
X"FFFFFFFE",
X"FFFFFFFD",
X"FFFFFFFB",
X"FFFFFFF7",
X"FFFFFFEF",
X"FFFFFFDF",
X"FFFFFFBF",
X"FFFFFF7F",
X"FFFFFEFF",
X"FFFFFDFF",
X"FFFFFBFF",
X"FFFFF7FF",
X"FFFFEFFF",
X"FFFFDFFF",
X"FFFFBFFF",
X"FFFF7FFF",
X"FFFEFFFF",
X"FFFDFFFF",
X"FFFBFFFF",
X"FFF7FFFF",
X"FFEFFFFF",
X"FFDFFFFF",
X"FFBFFFFF",
X"FF7FFFFF",
X"FEFFFFFF",
X"FDFFFFFF",
X"FBFFFFFF",
X"F7FFFFFF",
X"EFFFFFFF",
X"DFFFFFFF",
X"BFFFFFFF",
X"CFFFFFFF",
X"7FFFFFFF"
);
BEGIN
uut: muldiv
PORT MAP(
rst => rst,
clk => clk,
hilo_we => hilo_we,
din_hi => din_hi,
din_lo => din_lo,
mul_divn => mul_divn,
s_un => s_un,
start => start,
hilo_sel => hilo_sel,
busy => busy,
dout => dout
);
CLK_GEN: process
begin
wait for CLK_PERIOD/2;
clk <= not clk;
end process;
REF_GEN: process
begin
if mul_divn = '0' then
wait until rising_edge(clk) and check = '1';
if s_un = '1' then
rtmp <= unsigned(signed(md_result(31 downto 0)) * signed(din_lo));
wait until rising_edge(clk);
tmp2 <= unsigned(signed(rtmp(31 downto 0)) + signed(md_result(63 downto 32)));
wait until rising_edge(clk);
ref_hi <= tmp2(31 downto 0);
else
rtmp <= md_result(31 downto 0) * din_lo;
wait until rising_edge(clk);
tmp2 <= rtmp(31 downto 0) + md_result(63 downto 32);
wait until rising_edge(clk);
ref_hi <= tmp2(31 downto 0);
end if;
wait until rising_edge(clk);
if din_lo /= X"00000000" then
if ENABLE_FAIL_REPORT then
assert din_hi = ref_hi report "Error on divison" severity failure;
end if;
end if;
else
wait until rising_edge(clk) and check = '1';
if s_un = '1' then
ref_result <= unsigned(signed(din_hi) * signed(din_lo));
else
ref_result <= unsigned(din_hi) * unsigned(din_lo);
end if;
wait until rising_edge(clk);
wait until rising_edge(clk);
wait until rising_edge(clk);
if ENABLE_FAIL_REPORT then
assert ref_result = md_result report "Error on multiplication" severity failure;
end if;
end if;
end process;
STIMULUS: process
begin
wait for 3*CLK_PERIOD;
wait until rising_edge(clk);
rst <= '0';
wait for 2*CLK_PERIOD;
mul_divn <= '0';
s_un <= '0';
for i in 0 to operands'length-1 loop
for j in 0 to operands'length-1 loop
check <= '0';
wait until rising_edge(clk) and busy = '0';
din_hi <= operands(i);
din_lo <= operands(j);
start <= '1';
wait until rising_edge(clk);
start <= '0';
hilo_sel <= '0';
-- Read result
wait until rising_edge(clk) and busy = '0';
wait until rising_edge(clk);
md_result(31 downto 0) <= dout;
wait until rising_edge(clk);
hilo_sel <= '1';
wait until rising_edge(clk);
md_result(63 downto 32) <= dout;
check <= '1';
wait until rising_edge(clk);
check <= '0';
wait for 8*CLK_PERIOD;
end loop;
end loop;
s_un <= '1';
for i in 0 to operands'length-1 loop
for j in 0 to operands'length-1 loop
check <= '0';
wait until rising_edge(clk) and busy = '0';
din_hi <= operands(i);
din_lo <= operands(j);
start <= '1';
wait until rising_edge(clk);
start <= '0';
hilo_sel <= '0';
-- Read result
wait until rising_edge(clk) and busy = '0';
wait until rising_edge(clk);
md_result(31 downto 0) <= dout;
wait until rising_edge(clk);
hilo_sel <= '1';
wait until rising_edge(clk);
md_result(63 downto 32) <= dout;
check <= '1';
wait until rising_edge(clk);
check <= '0';
wait for 8*CLK_PERIOD;
end loop;
end loop;
mul_divn <= '1';
s_un <= '0';
for i in 0 to operands'length-1 loop
for j in 0 to operands'length-1 loop
check <= '0';
wait until rising_edge(clk) and busy = '0';
din_hi <= operands(i);
din_lo <= operands(j);
start <= '1';
wait until rising_edge(clk);
start <= '0';
hilo_sel <= '0';
-- Read result
wait until rising_edge(clk) and busy = '0';
wait until rising_edge(clk);
md_result(31 downto 0) <= dout;
wait until rising_edge(clk);
hilo_sel <= '1';
wait until rising_edge(clk);
md_result(63 downto 32) <= dout;
check <= '1';
wait until rising_edge(clk);
check <= '0';
wait for 8*CLK_PERIOD;
end loop;
end loop;
s_un <= '1';
for i in 0 to operands'length-1 loop
for j in 0 to operands'length-1 loop
check <= '0';
wait until rising_edge(clk) and busy = '0';
din_hi <= operands(i);
din_lo <= operands(j);
start <= '1';
wait until rising_edge(clk);
start <= '0';
hilo_sel <= '0';
-- Read result
wait until rising_edge(clk) and busy = '0';
wait until rising_edge(clk);
md_result(31 downto 0) <= dout;
wait until rising_edge(clk);
hilo_sel <= '1';
wait until rising_edge(clk);
md_result(63 downto 32) <= dout;
check <= '1';
wait until rising_edge(clk);
check <= '0';
wait for 8*CLK_PERIOD;
end loop;
end loop;
wait;
end process;
END;
+233
View File
@@ -0,0 +1,233 @@
-------------------------------------------------------------------------
-- Project: JIPS, a portable 32-bit RISC CPU written in VHDL
-- This file: Testbench for JCPU
-- also writes 'opc.lst' for JASM-assembler
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
--------------------------------------------------------------------------
LIBRARY ieee;
use IEEE.STD_LOGIC_1164.ALL;
USE ieee.numeric_std.ALL;
library work;
use work.mips_types.all;
use work.mips_instr.all;
use work.async_types.all;
use work.async_defs.all;
ENTITY tb_mips_sys IS
END tb_mips_sys;
ARCHITECTURE behavior OF tb_mips_sys IS
constant CLK_PERIOD : time := 10 ns;
constant ICACHE_SIZE : natural := 512; -- words
constant DCACHE_SIZE : natural := 512; -- words
constant SRAM_ADDR_WIDTH : integer := 17; -- bits
constant FLASH_ADDR_WIDTH : integer := 17; -- bits
signal debug : unsigned(1 downto 0);
-- Master
signal nmi : STD_LOGIC := '0';
signal rst : STD_LOGIC := '1';
signal clk : STD_LOGIC := '0';
signal eb : STD_LOGIC := '1';
signal flash_cs_n : std_logic;
signal flash_we_n : std_logic;
signal flash_oe_n : std_logic;
signal flash_be_n : unsigned(3 downto 0);
signal sram_cs_n : std_logic;
signal sram_be_n : unsigned(3 downto 0);
signal sram_wr_n : std_logic;
signal sram_oe_n : std_logic;
signal sram_a : unsigned(SRAM_ADDR_WIDTH-1 downto 0);
signal sram_d : unsigned(31 downto 0);
signal flash_a : unsigned(FLASH_ADDR_WIDTH-1 downto 0);
signal flash_d : unsigned(31 downto 0);
signal gpo0 : unsigned(31 downto 0);
signal gpo1 : unsigned(31 downto 0);
signal gpi0 : unsigned(31 downto 0) := (others => '0');
signal gpi1 : unsigned(31 downto 0) := (others => '0');
signal int_timer : std_logic;
signal int_uart : std_logic;
signal rx : std_logic := '1';
signal tx : std_logic;
type word_array_t is array (natural range <>) of unsigned(31 downto 0);
signal sram_data : word_array_t(0 to 2**SRAM_ADDR_WIDTH-1);
signal flash_data : word_array_t(0 to 2**FLASH_ADDR_WIDTH-1);
BEGIN
------------------------------------------------------------------
CLK_GEN: process
begin
wait for CLK_PERIOD/2;
clk <= not clk;
end process;
------------------------------------------------------------------
uut : entity work.mips_sys
GENERIC MAP
(
ICACHE_SIZE => ICACHE_SIZE, -- words
DCACHE_SIZE => DCACHE_SIZE, -- words
SRAM_ADDR_WIDTH => SRAM_ADDR_WIDTH,
FLASH_ADDR_WIDTH => FLASH_ADDR_WIDTH
)
PORT MAP
(
eb => eb,
nmi => nmi,
rst => rst,
clk => clk,
flash_cs_n => flash_cs_n,
flash_oe_n => flash_oe_n,
flash_we_n => flash_we_n,
flash_be_n => flash_be_n,
sram_cs_n => sram_cs_n,
sram_we_n => sram_wr_n,
sram_oe_n => sram_oe_n,
sram_be_n => sram_be_n,
sram_a => sram_a,
sram_d => sram_d,
flash_a => flash_a,
flash_d => flash_d,
gpo0 => gpo0,
gpo1 => gpo1,
gpi0 => gpi0,
gpi1 => gpi1,
rx => rx,
tx => tx,
debug => debug
);
------------------------------------------------------------------
SRAM_READ:
process(sram_a, sram_cs_n, sram_oe_n, sram_be_n)
begin
sram_d <= (others => 'Z') after 10 ns;
if sram_oe_n = '0' then
if sram_cs_n = '0' then
if sram_be_n(0) = '0' then
sram_d(7 downto 0) <= sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(7 downto 0) after 10 ns;
end if;
if sram_be_n(1) = '0' then
sram_d(15 downto 8) <= sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(15 downto 8) after 10 ns;
end if;
if sram_be_n(2) = '0' then
sram_d(23 downto 16) <= sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(23 downto 16) after 10 ns;
end if;
if sram_be_n(3) = '0' then
sram_d(31 downto 24) <= sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(31 downto 24) after 10 ns;
end if;
end if;
end if;
end process;
SRAM_WRITE:
process(sram_wr_n)
begin
if rising_edge(sram_wr_n) then
if sram_cs_n = '0' then
if sram_be_n(0) = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(7 downto 0) <= sram_d(7 downto 0);
end if;
if sram_be_n(1) = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(15 downto 8) <= sram_d(15 downto 8);
end if;
if sram_be_n(2) = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(23 downto 16) <= sram_d(23 downto 16);
end if;
if sram_be_n(3) = '0' then
sram_data(to_integer(sram_a(SRAM_ADDR_WIDTH-1 downto 2)))(31 downto 24) <= sram_d(31 downto 24);
end if;
end if;
end if;
end process;
------------------------------------------------------------------
FLASH_READ:
process(rst, flash_cs_n, flash_oe_n, flash_a)
type file_t is file of integer;
file load_flash : file_t open read_mode is "hello.flash.bin";
variable instr : integer;
variable index : natural;
variable temp : signed(31 downto 0);
constant tpd : time := 25 ns;
begin
if rst = '1' then
index := 0;
while not endfile(load_flash) loop
read(load_flash, instr);
temp := to_signed(instr, word_t'length);
flash_data(index) <= unsigned(temp);
index := index + 1;
end loop;
else
flash_d <= (others => 'Z') after tpd;
index := to_integer(flash_a(FLASH_ADDR_WIDTH-1 downto 2));
if flash_oe_n = '0' then
if flash_cs_n = '0' then
if flash_be_n(0) = '0' then
flash_d(7 downto 0) <= flash_data(index)(7 downto 0) after tpd;
end if;
if flash_be_n(1) = '0' then
flash_d(15 downto 8) <= flash_data(index)(15 downto 8) after tpd;
end if;
if flash_be_n(2) = '0' then
flash_d(23 downto 16) <= flash_data(index)(23 downto 16) after tpd;
end if;
if flash_be_n(3) = '0' then
flash_d(31 downto 24) <= flash_data(index)(31 downto 24) after tpd;
end if;
end if;
end if;
end if;
end process;
------------------------------------------------------------------
STIMULUS: process
begin
wait for 3*CLK_PERIOD;
wait until rising_edge(clk);
rst <= '0';
wait for 778254*CLK_PERIOD;
wait until rising_edge(clk);
nmi <= '0';
wait for 3000*CLK_PERIOD;
wait until rising_edge(clk);
nmi <= '0';
wait;
end process;
END;
-20
View File
@@ -1,20 +0,0 @@
vhdl work "../../src/core/mips_types.vhd"
vhdl work "../../../../misc/dpram_2w2r.vhd"
vhdl work "../../../../misc/dpram_1w1r_dist.vhd"
vhdl work "../../../../misc/dpram_1w1r.vhd"
vhdl work "../../../../FIFO/src/sync_fifo_ctrl.vhd"
vhdl work "../../../../FIFO/src/fifo_ctrl_pkg.vhd"
vhdl work "../../src/core/mips_instr.vhd"
vhdl work "../../../../FIFO/src/fifo_sync_dist.vhd"
vhdl work "../../src/core/mips_shifter.vhd"
vhdl work "../../src/core/mips_reg.vhd"
vhdl work "../../src/core/mips_muldiv.vhd"
vhdl work "../../src/core/mips_idecode_rom.vhd"
vhdl work "../../src/core/mips_icache.vhd"
vhdl work "../../src/core/mips_dcache.vhd"
vhdl work "../../src/core/mips_cop.vhd"
vhdl work "../../src/core/mips_bcu.vhd"
vhdl work "../../src/core/mips_alu.vhd"
vhdl work "../../src/core/mips_pipeline.vhd"
vhdl work "../../src/core/mips_biu.vhd"
vhdl work "../../src/core/mips_top.vhd"
@@ -1,20 +0,0 @@
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_types.vhd"
vhdl work "W:\vhdl\lib\misc\dpram_2w2r.vhd"
vhdl work "W:\vhdl\lib\misc\dpram_1w1r_dist.vhd"
vhdl work "W:\vhdl\lib\misc\dpram_1w1r.vhd"
vhdl work "W:\vhdl\lib\FIFO\src\sync_fifo_ctrl.vhd"
vhdl work "W:\vhdl\lib\FIFO\src\fifo_ctrl_pkg.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_instr.vhd"
vhdl work "W:\vhdl\lib\FIFO\src\fifo_sync_dist.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_shifter.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_reg.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_muldiv.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_idecode_rom.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_icache.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_dcache.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_cop.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_bcu.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_alu.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_pipeline.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_biu.vhd"
vhdl work "W:\vhdl\lib\CPUs\MIPS\src\core\mips_top.vhd"
-5
View File
@@ -1,5 +0,0 @@
2008-10-26
- Optimierung: MUL32x32 primitive für Virtex-4
- External COP 1..3 interface
- FPU (COP1)
- MMU
+8 -5
View File
@@ -1,17 +1,20 @@
CFLAGS=-O2 CFLAGS=-O2
CC=gcc CC=gcc
PREFIX=/usr/local
all: romgen ramgen flashgen all: romgen ramgen flashgen
romgen: ./src/romgen.c romgen: ./src/romgen.c
$(CC) $(CFLAGS) ./src/romgen.c -o ./romgen $(CC) $(CFLAGS) ./src/romgen.c -lm -o ./romgen
ramgen: ./src/ramgen.c ramgen: ./src/ramgen.c
$(CC) $(CFLAGS) ./src/ramgen.c -o ./ramgen $(CC) $(CFLAGS) ./src/ramgen.c -lm -o ./ramgen
flashgen: ./src/flashgen.c flashgen: ./src/flashgen.c
$(CC) $(CFLAGS) ./src/flashgen.c -o ./flashgen $(CC) $(CFLAGS) ./src/flashgen.c -lm -o ./flashgen
install:
cp romgen $(PREFIX)/bin
cp ramgen $(PREFIX)/bin
cp flashgen $(PREFIX)/bin
clean: clean:
rm -rf romgen* ramgen* flashgen* rm -rf romgen* ramgen* flashgen*
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+29 -6
View File
@@ -17,10 +17,25 @@
#define SDRAM_BASE 0x40000000 #define SDRAM_BASE 0x40000000
#define FLASH_OFFSET 0x00000000 #define FLASH_OFFSET 0x00000000
#define MAGIC_EB 0x4A464931 // "JFI1" in big-endian;
#define MAGIC_EL 0x3149464A // "JFI1" in little-endian;
UINT32 conv_endian32(UINT32 src)
{
UINT32 dst;
dst = (0xFF000000 & (src << 24))
| (0x00FF0000 & (src << 8))
| (0x0000FF00 & (src >> 8))
| (0x000000FF & (src >> 24));
return dst;
};
// -------------------------------------------------------------- // --------------------------------------------------------------
typedef struct _sflash_img_hdr_t typedef struct _sflash_img_hdr_t
{ {
UINT8 magic[4]; UINT32 magic;
UINT32 target_addr; UINT32 target_addr;
UINT32 img_offset; UINT32 img_offset;
UINT32 img_size; UINT32 img_size;
@@ -54,6 +69,7 @@ int main(int argc, char *argv[])
char name_flash[1024]; char name_flash[1024];
char name_prj[1024]; char name_prj[1024];
char *pBuf; char *pBuf;
UINT32 *pBuf32;
flash_img_hdr_t img_hdr = {0}; flash_img_hdr_t img_hdr = {0};
FILE *pFile; FILE *pFile;
@@ -63,7 +79,7 @@ int main(int argc, char *argv[])
if (argc < 2) if (argc < 2)
{ {
fprintf(stderr, "Usage: flashgen <input file>\n"); fprintf(stderr, "Usage: flashgen <input file> [-{EL|EB}]\n");
return 1; return 1;
} }
@@ -98,15 +114,22 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
img_hdr.magic[0] = 'J'; img_hdr.magic = MAGIC_EL;
img_hdr.magic[1] = 'F';
img_hdr.magic[2] = 'I';
img_hdr.magic[3] = '1';
img_hdr.target_addr = SDRAM_BASE; img_hdr.target_addr = SDRAM_BASE;
img_hdr.img_size = filesize; img_hdr.img_size = filesize;
img_hdr.img_offset = FLASH_OFFSET + sizeof(flash_img_hdr_t); img_hdr.img_offset = FLASH_OFFSET + sizeof(flash_img_hdr_t);
img_hdr.hdr_next = FLASH_OFFSET; img_hdr.hdr_next = FLASH_OFFSET;
if (argc == 3)
{
if ((argv[2][0] == '-') && (toupper(argv[2][1]) == 'E') && (toupper(argv[2][2]) == 'B'))
{
img_hdr.magic = MAGIC_EB;
pBuf32 = (UINT32*)pBuf;
for (i=0; i < filesize/4; i ++)
pBuf32[i] = conv_endian32(pBuf32[i]);
}
}
fwrite(&img_hdr, sizeof(flash_img_hdr_t), 1, pFile); fwrite(&img_hdr, sizeof(flash_img_hdr_t), 1, pFile);
fwrite(pBuf, 1, filesize, pFile); fwrite(pBuf, 1, filesize, pFile);
+63 -3
View File
@@ -3,11 +3,54 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#define INT8 char
#define INT16 short
#define INT32 long
#define UINT8 unsigned char
#define UINT16 unsigned short
#define UINT32 unsigned long
#define INT int
#define UINT unsigned int
#define FLOAT32 float
#define FLOAT64 double
#define ARCH_NAME "data" #define ARCH_NAME "data"
#define ENT_NAME "rom" #define ENT_NAME "rom"
#define JTAG_ADDR_WIDTH 16 #define JTAG_ADDR_WIDTH 16
UINT32 g_endianess_EB;
// -------------------------------------------------------------- // --------------------------------------------------------------
UINT32 conv_endian32(UINT32 src)
{
UINT32 dst;
dst = (0xFF000000 & (src << 24))
| (0x00FF0000 & (src << 8))
| (0x0000FF00 & (src >> 8))
| (0x000000FF & (src >> 24));
return dst;
};
UINT32 to_big_endian32(UINT32 src)
{
#ifndef NATIVE_IS_BIG_ENDIAN
return conv_endian32(src);
#else
return src;
#endif
}
UINT32 from_big_endian32(UINT32 src)
{
#ifndef NATIVE_IS_BIG_ENDIAN
return conv_endian32(src);
#else
return src;
#endif
}
void basename(char *pSrc, char *pDst) void basename(char *pSrc, char *pDst)
{ {
int i, size; int i, size;
@@ -90,7 +133,11 @@ int SaveROM(char *pFilenameIn, char *pFilenameOut, char *pArchName, char *pEntNa
for (i=0; i < filesize; i += sizeof(int)) for (i=0; i < filesize; i += sizeof(int))
{ {
fread(&word, 1, sizeof(int), pFileIn); fread(&word, 1, sizeof(int), pFileIn);
if (g_endianess_EB)
fprintf(pFileOut, "\t\tX\"%8.8X\"", to_big_endian32(word));
else
fprintf(pFileOut, "\t\tX\"%8.8X\"", word); fprintf(pFileOut, "\t\tX\"%8.8X\"", word);
if (i < (romsize-sizeof(int))) if (i < (romsize-sizeof(int)))
fprintf(pFileOut, ", -- %8.8X\n", i); fprintf(pFileOut, ", -- %8.8X\n", i);
else else
@@ -208,7 +255,11 @@ int SaveROM_V4LD(char *pFilenameIn, char *pFilenameOut, char *pArchName, char *p
for (i=0; i < filesize; i += sizeof(int)) for (i=0; i < filesize; i += sizeof(int))
{ {
fread(&word, 1, sizeof(int), pFileIn); fread(&word, 1, sizeof(int), pFileIn);
if (g_endianess_EB)
fprintf(pFileOut, "\t\tX\"%8.8X\"", to_big_endian32(word));
else
fprintf(pFileOut, "\t\tX\"%8.8X\"", word); fprintf(pFileOut, "\t\tX\"%8.8X\"", word);
if (i < (romsize-sizeof(int))) if (i < (romsize-sizeof(int)))
fprintf(pFileOut, ", -- %8.8X\n", i); fprintf(pFileOut, ", -- %8.8X\n", i);
else else
@@ -269,7 +320,8 @@ int SaveROM_TCL(char *pFilenameIn, char *pFilenameOut, char *pArchName, char *pE
char binstr_addr[33]; char binstr_addr[33];
char binstr_data[33]; char binstr_data[33];
char tpl[] = {"# ---------------------------------------------------------------------\n# For Chipscope 9.1\n# ---------------------------------------------------------------------\n# Source JTAG/TCL frame work\ncd $env(CHIPSCOPE)\\\\bin\\\\nt\nsource csejtag.tcl\n\nnamespace import ::chipscope::*\n\n# Platform USB Cable\nset PLATFORM_USB_CABLE_ARGS [list \"port=USB2\" \"frequency=6000000\"]\n# frequency=\"24000000 | 12000000 | 6000000 | 3000000 | 1500000 | 750000\"\n\n# Create session\nset handle [::chipscope::csejtag_session create 0]\n\n# Open JTAG and lock\nset open_result [::chipscope::csejtag_target open $handle $CSEJTAG_TARGET_PLATFORMUSB 0 $PLATFORM_USB_CABLE_ARGS]\nset lock_result [::chipscope::csejtag_target lock $handle 1000]\n\nset devlist [::chipscope::csejtag_tap autodetect_chain $handle $CSEJTAG_SCAN_DEFAULT]\n\n# Get Device ID\nset devtype \"Virtex-4SX\"\nset devid 2\nset irlength [::chipscope::csejtag_tap get_irlength $handle $devid]\nset idcode [::chipscope::csejtag_tap get_device_idcode $handle $devid]\n\nset CSE_OP $CSEJTAG_SHIFT_READWRITE\nset CSE_ES $CSEJTAG_RUN_TEST_IDLE\n\n# Write Program\n"}; char tpl[] =
{"# ---------------------------------------------------------------------\n# For Chipscope 10.1\n# ---------------------------------------------------------------------\n# Source JTAG/TCL frame work\nsource $env(CS_PATH)\\\\csejtag.tcl\n\nnamespace import ::chipscope::*\n\n# Platform USB Cable\n# Create session\nset handle [::chipscope::csejtag_session create 0]\n\n# Open JTAG and lock\nset open_result [::chipscope::csejtag_target open $handle $CSEJTAG_TARGET_PLATFORMUSB 0 \"port=USB2\" \"frequency=6000000\"]\n# frequency=\"24000000 | 12000000 | 6000000 | 3000000 | 1500000 | 750000\"\n\nset lock_result [::chipscope::csejtag_target lock $handle 1000]\n\nset devlist [::chipscope::csejtag_tap autodetect_chain $handle $CSEJTAG_SCAN_DEFAULT]\n\n# Get Device ID\nset devtype \"Virtex-4SX\"\nset devid 2\nset irlength [::chipscope::csejtag_tap get_irlength $handle $devid]\nset idcode [::chipscope::csejtag_tap get_device_idcode $handle $devid]\n\nset CSE_OP $CSEJTAG_SHIFT_READWRITE\nset CSE_ES $CSEJTAG_RUN_TEST_IDLE\n\n# Write Program\n"};
pFileIn = fopen(pFilenameIn, "rb"); pFileIn = fopen(pFilenameIn, "rb");
if (!pFileIn) if (!pFileIn)
@@ -313,6 +365,9 @@ int SaveROM_TCL(char *pFilenameIn, char *pFilenameOut, char *pArchName, char *pE
for (i=0; i < filesize; i += sizeof(int)) for (i=0; i < filesize; i += sizeof(int))
{ {
fread(&word, 1, sizeof(int), pFileIn); fread(&word, 1, sizeof(int), pFileIn);
if (g_endianess_EB)
fprintf(pFileOut, "::chipscope::csejtag_tap shift_device_dr $handle $devid $CSE_OP $CSE_ES 0 %d \"%4.4X%8.8X\"\n", nbits_data + JTAG_ADDR_WIDTH, word_addr, to_big_endian32(word));
else
fprintf(pFileOut, "::chipscope::csejtag_tap shift_device_dr $handle $devid $CSE_OP $CSE_ES 0 %d \"%4.4X%8.8X\"\n", nbits_data + JTAG_ADDR_WIDTH, word_addr, word); fprintf(pFileOut, "::chipscope::csejtag_tap shift_device_dr $handle $devid $CSE_OP $CSE_ES 0 %d \"%4.4X%8.8X\"\n", nbits_data + JTAG_ADDR_WIDTH, word_addr, word);
word_addr++; word_addr++;
} }
@@ -344,14 +399,19 @@ int main(int argc, char *argv[])
if (argc < 2) if (argc < 2)
{ {
fprintf(stderr, "Usage: romgen <input file> <num. word address bits>\n"); fprintf(stderr, "Usage: romgen <input file> <num. word address bits> [-{EL|EB}]\n");
return 1; return 1;
} }
pFilenameIn = argv[1]; pFilenameIn = argv[1];
if (argc == 3)
nbits_addr = atoi(argv[2]); nbits_addr = atoi(argv[2]);
g_endianess_EB = 0;
if (argc == 4)
{
if ((argv[3][0] == '-') && (toupper(argv[3][1]) == 'E') && (toupper(argv[3][2]) == 'B'))
g_endianess_EB = 1;
}
basename(pFilenameIn, name_prj); basename(pFilenameIn, name_prj);
sprintf(name_rom, "%s.vhd", name_prj); sprintf(name_rom, "%s.vhd", name_prj);
+8
View File
@@ -0,0 +1,8 @@
VHDL/lib/FIFO/src/async_fifo_ctrl.vhd
VHDL/lib/FIFO/src/fifo_async_ctrl.vhd
VHDL/lib/FIFO/src/fifo_async_ctrl.vhd
VHDL/lib/FIFO/src/fifo_sync_ctrl.vhd
VHDL/lib/FIFO/src/sync_fifo_ctrl.vhd
VHDL/lib/FIFO/src/fifo_sync_ctrl.vhd
+248
View File
@@ -0,0 +1,248 @@
-------------------------------------------------------------------------
-- Project: FIFO, generic FIFOs written in VHDL
-- Release 1
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
-----------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
LIBRARY WORK;
USE WORK.FIFO_CTRL_PKG.ALL;
entity fifo_async_ctrl is
Generic
(
addr_width : integer := 3;
almost_full_thresh : integer := 6;
almost_empty_thresh : integer := 2
);
Port
(
rst : in STD_LOGIC;
clk_w : in STD_LOGIC;
clk_r : in STD_LOGIC;
winc : in STD_LOGIC;
rinc : in STD_LOGIC;
ptr_w : out unsigned (addr_width-1 downto 0);
ptr_r : out unsigned (addr_width-1 downto 0);
fifo_pre_full : out STD_LOGIC;
fifo_pre_empty : out STD_LOGIC;
fifo_full : out STD_LOGIC;
fifo_empty : out STD_LOGIC;
fifo_afull : out STD_LOGIC;
fifo_aempty : out STD_LOGIC
);
end fifo_async_ctrl;
architecture Behavioral of fifo_async_ctrl is
signal gcnt_w : unsigned (addr_width downto 0);
signal gcnt2_w : unsigned (addr_width downto 0);
signal bcnt2_aw : unsigned (addr_width downto 0);
signal bcnt_w : unsigned (addr_width downto 0);
signal gnxt_w : unsigned (addr_width downto 0);
signal bnxt_w : unsigned (addr_width downto 0);
signal gcnt_r : unsigned (addr_width downto 0);
signal gcnt2_r : unsigned (addr_width downto 0);
signal bcnt2_ar : unsigned (addr_width downto 0);
signal bcnt_r : unsigned (addr_width downto 0);
signal gnxt_r : unsigned (addr_width downto 0);
signal bnxt_r : unsigned (addr_width downto 0);
signal pre_empty, pre_full : std_logic;
signal full, empty : std_logic;
-- synthesis translate_off
signal diffw : signed (addr_width downto 0);
signal diffr : signed (addr_width downto 0);
-- synthesis translate_on
begin
ptr_w <= bcnt_w(addr_width-1 downto 0);
ptr_r <= bnxt_r(addr_width-1 downto 0);
fifo_full <= full;
fifo_empty <= empty;
fifo_pre_full <= pre_full;
fifo_pre_empty <= pre_empty;
proc_write_inhibit:
process(rst, clk_w)
begin
if rst = '1' then
full <= '0';
elsif rising_edge(clk_w) then
full <= pre_full;
end if;
end process;
proc_read_inhibit:
process(rst, clk_r)
begin
if rst = '1' then
empty <= '1';
elsif rising_edge(clk_r) then
empty <= pre_empty;
end if;
end process;
proc_sync_grptr:
process(clk_w)
variable p1, p2 : unsigned (addr_width downto 0);
begin
if rising_edge(clk_w) then
gcnt2_r <= p2;
p2 := p1;
p1 := gcnt_r;
end if;
end process;
proc_ptr_gwptr:
process(clk_r)
variable p1, p2 : unsigned (addr_width downto 0);
begin
if rising_edge(clk_r) then
gcnt2_w <= p2;
p2 := p1;
p1 := gcnt_w;
end if;
end process;
proc_status_full:
process(gnxt_w, gcnt2_r)
begin
if (gnxt_w = (not gcnt2_r(gcnt2_r'left downto gcnt2_r'left-1) & gcnt2_r(gcnt2_r'left-2 downto 0))) then
pre_full <= '1';
else
pre_full <= '0';
end if;
end process;
proc_status_empty:
process(gnxt_r, gcnt2_w)
begin
if (gnxt_r = gcnt2_w) then
pre_empty <= '1';
else
pre_empty <= '0';
end if;
end process;
proc_sync_arptr:
process(clk_w)
variable p1, p2 : unsigned (addr_width downto 0);
begin
if rising_edge(clk_w) then
bcnt2_ar <= p2;
p2 := p1;
p1 := bcnt_r;
end if;
end process;
proc_ptr_awptr:
process(clk_r)
variable p1, p2 : unsigned (addr_width downto 0);
begin
if rising_edge(clk_r) then
bcnt2_aw <= p2;
p2 := p1;
p1 := bcnt_w;
end if;
end process;
proc_status_almost_full:
process(rst, clk_w)
variable diff : unsigned (addr_width downto 0);
begin
-- synthesis translate_off
diffw <= signed(diff);
-- synthesis translate_on
if rst = '1' then
fifo_afull <= '0';
diff := (others => '0');
elsif rising_edge(clk_w) then
if diff >= almost_full_thresh-1 then
fifo_afull <= '1';
else
fifo_afull <= '0';
end if;
diff := unsigned(abs(signed(bnxt_w) - signed(bcnt2_ar)));
end if;
end process;
proc_status_almost_empty:
process(rst, clk_r)
variable diff : unsigned (addr_width downto 0);
begin
-- synthesis translate_off
diffr <= signed(diff);
-- synthesis translate_on
if rst = '1' then
fifo_aempty <= '1';
diff := (others => '0');
elsif rising_edge(clk_r) then
if diff <= almost_empty_thresh+1 then
fifo_aempty <= '1';
else
fifo_aempty <= '0';
end if;
diff := unsigned(abs(signed(bcnt2_aw) - signed(bnxt_r)));
end if;
end process;
inst_gray_counter_w : entity work.gray_counter
generic map
(
width => addr_width+1,
init_value => 0
)
port map
(
rst => rst,
clk => clk_w,
ce => winc,
bcnt => bcnt_w,
bnxt => bnxt_w,
gcnt => gcnt_w,
gnxt => gnxt_w
);
inst_gray_counter_r : entity work.gray_counter
generic map
(
width => addr_width+1,
init_value => 0
)
port map
(
rst => rst,
clk => clk_r,
ce => rinc,
bcnt => bcnt_r,
bnxt => bnxt_r,
gcnt => gcnt_r,
gnxt => gnxt_r
);
end Behavioral;
+124
View File
@@ -0,0 +1,124 @@
-------------------------------------------------------------------------
-- Project: FIFO, generic FIFOs written in VHDL
-- Release 1
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
-----------------------------------------------------------------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
use work.fifo_ctrl_pkg.all;
entity fifo_async is
Generic
(
addr_width : natural := 4;
data_width : natural := 8;
almost_full_thresh : integer := 12;
almost_empty_thresh : integer := 4;
allow_full_writes : boolean := false;
allow_empty_reads : boolean := false;
do_last_read_update : boolean := true
);
Port
(
rst : in STD_LOGIC;
clk_w : in STD_LOGIC;
clk_r : in STD_LOGIC;
we : in STD_LOGIC;
re : in STD_LOGIC;
fifo_full : out STD_LOGIC;
fifo_empty : out STD_LOGIC;
fifo_afull : out STD_LOGIC;
fifo_aempty : out STD_LOGIC;
data_w : in unsigned (data_width-1 downto 0);
data_r : out unsigned (data_width-1 downto 0)
);
end fifo_async;
architecture Behavioral of fifo_async is
signal mem_wr_en : STD_LOGIC;
signal mem_rd_en : STD_LOGIC;
signal ptr_w : unsigned (addr_width-1 downto 0);
signal ptr_r : unsigned (addr_width-1 downto 0);
signal full : std_logic;
signal empty : std_logic;
signal pre_full : STD_LOGIC;
signal pre_empty : STD_LOGIC;
signal rinc : std_logic;
begin
fifo_full <= full;
fifo_empty <= empty;
mem_wr_en <= (we and not full) when allow_full_writes = false else we;
rinc <= (re and not empty) when allow_empty_reads = false else re;
mem_rd_en <= not pre_empty when do_last_read_update = false else '1';
inst_fifo_async_ctrl: entity work.fifo_async_ctrl
GENERIC MAP
(
addr_width => addr_width,
almost_full_thresh => almost_full_thresh,
almost_empty_thresh => almost_empty_thresh
)
PORT MAP
(
rst => rst,
clk_w => clk_w,
clk_r => clk_r,
winc => mem_wr_en,
rinc => rinc,
ptr_w => ptr_w,
ptr_r => ptr_r,
fifo_full => full,
fifo_empty => empty,
fifo_pre_full => pre_full,
fifo_pre_empty => pre_empty,
fifo_afull => fifo_afull,
fifo_aempty => fifo_aempty
);
inst_dpram_1w1r: entity work.dpram_1w1r
GENERIC MAP
(
addr_width => addr_width,
data_width => data_width
)
PORT MAP(
clka => clk_w,
clkb => clk_r,
en_a => '1',
en_b => mem_rd_en,
we_a => mem_wr_en,
addr_a => ptr_w,
addr_b => ptr_r,
din_a => data_w,
dout_b => data_r
);
end Behavioral;
+67
View File
@@ -0,0 +1,67 @@
-------------------------------------------------------------------------
-- Project: FIFO, generic FIFOs written in VHDL
-- Release 1
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
-----------------------------------------------------------------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
package fifo_ctrl_pkg is
-- Constants
-- Types
-- Functions
function bin2gray(xb : unsigned) return unsigned;
function gray2bin(xg : unsigned) return unsigned;
end fifo_ctrl_pkg;
package body fifo_ctrl_pkg is
function bin2gray(xb : unsigned) return unsigned is
variable xg : unsigned(xb'left downto xb'right);
begin
xg(xg'left) := xb(xb'left);
for i in 1 to xb'left loop
xg(xg'left-i) := xb(xb'left-i+1) xor xb(xb'left-i);
end loop;
return xg;
end bin2gray;
function gray2bin(xg : unsigned) return unsigned is
variable xb : unsigned(xg'left downto xg'right);
begin
xb(xb'left) := xg(xg'left);
for i in 1 to xg'left loop
xb(xb'left-i) := xb(xb'left-i+1) xor xg(xg'left-i);
end loop;
return xb;
end gray2bin;
end fifo_ctrl_pkg;
+123
View File
@@ -0,0 +1,123 @@
-------------------------------------------------------------------------
-- Project: FIFO, generic FIFOs written in VHDL
-- Release 1
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
-----------------------------------------------------------------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
use work.fifo_ctrl_pkg.all;
entity fifo_sync is
Generic
(
addr_width : natural := 4;
data_width : natural := 8;
almost_full_thresh : integer := 12;
almost_empty_thresh : integer := 4;
allow_full_writes : boolean := false;
allow_empty_reads : boolean := false;
do_last_read_update : boolean := true
);
Port
(
rst : in STD_LOGIC;
clk : in STD_LOGIC;
we : in STD_LOGIC;
re : in STD_LOGIC;
fifo_full : out STD_LOGIC;
fifo_empty : out STD_LOGIC;
fifo_afull : out STD_LOGIC;
fifo_aempty : out STD_LOGIC;
data_w : in unsigned (data_width-1 downto 0);
data_r : out unsigned (data_width-1 downto 0)
);
end fifo_sync;
architecture Behavioral of fifo_sync is
signal mem_wr_en : STD_LOGIC;
signal mem_rd_en : STD_LOGIC;
signal ptr_w : unsigned (addr_width-1 downto 0);
signal ptr_r : unsigned (addr_width-1 downto 0);
signal full : STD_LOGIC;
signal empty : std_logic;
signal pre_full : STD_LOGIC;
signal pre_empty : STD_LOGIC;
signal rinc : std_logic;
begin
fifo_full <= full;
fifo_empty <= empty;
mem_wr_en <= (we and not full) when allow_full_writes = false else we;
rinc <= (re and not empty) when allow_empty_reads = false else re;
mem_rd_en <= not pre_empty when do_last_read_update = false else '1';
inst_fifo_sync_ctrl: entity work.fifo_sync_ctrl
GENERIC MAP
(
addr_width => addr_width,
almost_full_thresh => almost_full_thresh,
almost_empty_thresh => almost_empty_thresh
)
PORT MAP
(
rst => rst,
clk => clk,
winc => mem_wr_en,
rinc => rinc,
ptr_w => ptr_w,
ptr_r => ptr_r,
fifo_full => full,
fifo_empty => empty,
fifo_pre_full => pre_full,
fifo_pre_empty => pre_empty,
fifo_afull => fifo_afull,
fifo_aempty => fifo_aempty
);
inst_dpram_1w1r: entity work.dpram_1w1r
GENERIC MAP
(
addr_width => addr_width,
data_width => data_width
)
PORT MAP(
clka => clk,
clkb => clk,
en_a => '1',
en_b => mem_rd_en,
we_a => mem_wr_en,
addr_a => ptr_w,
addr_b => ptr_r,
din_a => data_w,
dout_b => data_r
);
end Behavioral;
+84
View File
@@ -0,0 +1,84 @@
-------------------------------------------------------------------------
-- Project: FIFO, generic FIFOs written in VHDL
-- Release 1
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
-----------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
LIBRARY WORK;
USE WORK.FIFO_CTRL_PKG.ALL;
entity gray_counter is
Generic (
width : natural := 3;
init_value : natural := 0
);
Port
(
rst : in STD_LOGIC;
clk : in STD_LOGIC;
ce : in STD_LOGIC;
bcnt : out unsigned (width-1 downto 0);
bnxt : out unsigned (width-1 downto 0);
gcnt : out unsigned (width-1 downto 0);
gnxt : out unsigned (width-1 downto 0)
);
end gray_counter;
architecture Behavioral of gray_counter is
signal cntg : unsigned (width-1 downto 0);
signal cntb : unsigned (width-1 downto 0);
signal nxtb : unsigned (width-1 downto 0);
signal nxtg : unsigned (width-1 downto 0);
begin
bnxt <= nxtb;
gnxt <= nxtg;
bcnt <= cntb;
gcnt <= cntg;
process(rst, clk, ce, cntb, nxtb)
begin
if rst = '1' then
cntb <= to_unsigned(init_value, width);
nxtb <= to_unsigned(init_value, width);
nxtg <= to_unsigned(init_value, width);
cntg <= to_unsigned(init_value, width);
else
if rising_edge(clk) then
cntg <= nxtg;
cntb <= nxtb;
end if;
nxtg <= bin2gray(nxtb);
nxtb <= cntb;
if ce = '1' then
nxtb <= cntb + 1;
end if;
end if;
end process;
end Behavioral;
+198
View File
@@ -0,0 +1,198 @@
-------------------------------------------------------------------------
-- Project: FIFO, generic FIFOs written in VHDL
-- Release 1
--
-- Copyright (C) 2007 J. Ahrensfeld
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
-----------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
entity fifo_sync_ctrl is
Generic
(
addr_width : integer := 3;
almost_full_thresh : integer := 6;
almost_empty_thresh : integer := 2
);
Port
(
rst : in STD_LOGIC;
clk : in STD_LOGIC;
winc : in STD_LOGIC;
rinc : in STD_LOGIC;
ptr_w : out unsigned (addr_width-1 downto 0);
ptr_r : out unsigned (addr_width-1 downto 0);
fifo_pre_full : out STD_LOGIC;
fifo_pre_empty : out STD_LOGIC;
fifo_full : out STD_LOGIC;
fifo_empty : out STD_LOGIC;
fifo_afull : out STD_LOGIC;
fifo_aempty : out STD_LOGIC
);
end fifo_sync_ctrl;
architecture Behavioral of fifo_sync_ctrl is
signal pW, pW_cnt, pW_next : unsigned (addr_width-1 downto 0);
signal pR, pR_cnt, pR_next : unsigned (addr_width-1 downto 0);
signal empty, full : std_logic;
signal pre_empty, pre_full : std_logic;
signal was_write : std_logic;
signal diff : unsigned (addr_width downto 0);
begin
fifo_full <= full;
fifo_empty <= empty;
fifo_pre_full <= pre_full;
fifo_pre_empty <= pre_empty;
proc_diff_gen:
process(rst, clk)
begin
if rst = '1' then
diff <= (others => '0');
elsif rising_edge(clk) then
if winc = '1' and rinc = '0' then
diff <= diff + 1;
elsif winc = '0' and rinc = '1' then
diff <= diff - 1;
end if;
end if;
end process;
proc_status_almost_full:
process(rst, clk)
begin
if rst = '1' then
fifo_afull <= '0';
elsif rising_edge(clk) then
if diff >= almost_full_thresh-1 then
fifo_afull <= '1';
else
fifo_afull <= '0';
end if;
end if;
end process;
proc_status_almost_empty:
process(rst, clk)
begin
if rst = '1' then
fifo_aempty <= '1';
elsif rising_edge(clk) then
if diff <= almost_empty_thresh+1 then
fifo_aempty <= '1';
else
fifo_aempty <= '0';
end if;
end if;
end process;
proc_full_reg:
process(rst, clk)
begin
if rst = '1' then
full <= '0';
elsif rising_edge(clk) then
full <= pre_full;
end if;
end process;
proc_empty_reg:
process(rst, clk)
begin
if rst = '1' then
empty <= '1';
elsif rising_edge(clk) then
empty <= pre_empty;
end if;
end process;
proc_status_w:
process(was_write, pW_next, pR_next, pW, pR, winc, rinc)
begin
if (pW_next = pR) and (winc = '1' or was_write = '1') then
pre_full <= '1';
else
pre_full <= '0';
end if;
if (pR_next = pW) and (rinc = '1' or was_write = '0') then
pre_empty <= '1';
else
pre_empty <= '0';
end if;
end process;
proc_flag_write:
process(rst, clk)
begin
if rst = '1' then
was_write <= '0';
elsif rising_edge(clk) then
if winc = '1' then
was_write <= '1';
elsif rinc = '1' then
was_write <= '0';
end if;
end if;
end process;
proc_ptr_w:
process(rst, clk, pW, winc)
begin
if rst = '1' then
pW <= to_unsigned(0, addr_width);
pW_next <= to_unsigned(0, addr_width);
elsif rising_edge(clk) then
if winc = '1' then
pW <= pW_next;
end if;
end if;
pW_next <= pW;
if winc = '1' then
pW_next <= pW + 1;
end if;
ptr_w <= pW;
end process;
proc_ptr_r:
process(rst, clk, pR_next, pR, rinc)
begin
if rst = '1' then
pR <= to_unsigned(0, addr_width);
pR_next <= to_unsigned(0, addr_width);
elsif rising_edge(clk) then
if rinc = '1' then
pR <= pR_next;
end if;
end if;
pR_next <= pR;
if rinc = '1' then
pR_next <= pR + 1;
end if;
ptr_r <= pR_next;
end process;
end Behavioral;
+317
View File
@@ -0,0 +1,317 @@
-----------------------------------------------------------------------
-- $Header: /tmp/cvsroot/VHDL/lib/misc/async_port_wb.vhd,v 1.16 2010-02-09 09:56:37 Jens Exp $
-----------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
use work.async_types.all;
------------------------------------------------------------------
entity async_port_wb is
Generic
(
f_sysclk : real := 100.0;
addr_width : natural := 32;
data_width : natural := 32;
byte_sel_width : natural := 4;
async_timespec : async_timespec_t
);
Port
(
CLK_I : in STD_LOGIC;
RST_I : in STD_LOGIC;
CYC_I : in STD_LOGIC;
STB_I : in STD_LOGIC;
WE_I : in STD_LOGIC;
ACK_O : out STD_LOGIC;
SRDY_O : out STD_LOGIC;
MRDY_I : in STD_LOGIC;
SEL_I : in unsigned(3 downto 0);
ADDR_I : in unsigned(31 downto 0);
DAT_I : in unsigned(31 downto 0);
DAT_O : out unsigned(31 downto 0);
page_mode_en : in STD_LOGIC;
async_a : out unsigned(addr_width-1 downto 0);
async_d : inout unsigned(data_width-1 downto 0);
async_cs : out std_logic;
async_wr : out std_logic;
async_rd : out std_logic;
async_be : out unsigned(byte_sel_width-1 downto 0);
async_rst : out std_logic
);
end async_port_wb;
architecture Behavioral of async_port_wb is
type async_t is record
cs : std_logic;
wr : std_logic;
rd : std_logic;
rst : std_logic;
drive_d : std_logic;
end record;
type async_state_t is (start, reset, idle, leadin, pulse, leadout, release);
signal s, sn : async_state_t;
signal as : async_t;
signal ack : std_logic;
signal cc_rst : std_logic;
signal cycle_cnt : natural range 0 to 31;
signal cycle_reload : natural range 0 to 31;
signal rdy : std_logic;
signal rdyo : std_logic;
signal en : std_logic;
signal is_idle : std_logic;
signal DAT_I_r : unsigned(data_width-1 downto 0);
signal SEL_I_r : unsigned(byte_sel_width-1 downto 0);
signal WE_I_r : std_logic;
signal ADDR_I_r : unsigned(addr_width-1 downto 0);
signal page_mode_en_r : std_logic;
signal do_page_read : std_logic;
------------------------------------------------------------------
begin
ASSERT to_cycles(async_timespec.T_pulse_rd, f_sysclk) > 0 report "Read pulse length must be greater than zero!" severity failure;
ASSERT to_cycles(async_timespec.T_pulse_wr, f_sysclk) > 0 report "Write pulse length must be greater than zero!" severity failure;
ASSERT (not async_timespec.can_page_rd OR (to_cycles(async_timespec.T_pulse_page_rd, f_sysclk) > 1)) report "Read page pulse length must be greater than one!" severity failure;
SRDY_O <= CYC_I and rdyo;
en <= CYC_I and STB_I;
do_page_read <= '1' when (async_timespec.can_page_rd and (WE_I = '0') and (WE_I_r = '0') and (ADDR_I(addr_width-1 downto async_timespec.nbits_page_rd) = ADDR_I_r(addr_width-1 downto async_timespec.nbits_page_rd))) else '0';
proc_cycle_counter:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if cc_rst = '1' then
cycle_cnt <= cycle_reload;
elsif cycle_cnt /= 0 then
cycle_cnt <= cycle_cnt - 1;
end if;
end if;
end process;
------------------------------------------------------------------
proc_state_next:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
s <= start;
else
s <= sn;
end if;
end if;
end process;
proc_state:
process(s, cycle_cnt, en, WE_I, WE_I_r, do_page_read)
begin
cycle_reload <= to_cycles(async_timespec.T_pulse_rst, f_sysclk);
cc_rst <= '0';
as.rst <= '0';
as.cs <= '0';
as.wr <= '0';
as.rd <= '0';
as.drive_d <= '0';
ack <= '0';
rdy <= '0';
is_idle <= '0';
sn <= s;
case s is
when start =>
cc_rst <= '1';
sn <= reset;
when reset =>
as.rst <= '1';
if cycle_cnt = 0 then
sn <= idle;
end if;
when idle =>
rdy <= '1';
is_idle <= '1';
if en = '1' then
as.cs <= '1';
cc_rst <= '1';
if to_cycles(async_timespec.T_leadin, f_sysclk) = 0 then
sn <= pulse;
if WE_I = '1' then
cycle_reload <= 0;
sn <= leadin; -- always lead-in for writes
else
cycle_reload <= to_cycles(async_timespec.T_pulse_rd, f_sysclk) - 1;
as.rd <= '1';
end if;
else
cycle_reload <= to_cycles(async_timespec.T_leadin, f_sysclk) - 1;
sn <= leadin;
end if;
end if;
when leadin =>
as.cs <= '1';
as.rd <= not WE_I_r;
as.drive_d <= WE_I_r;
as.wr <= WE_I_r;
if cycle_cnt = 0 then
cc_rst <= '1';
sn <= pulse;
if WE_I_r = '1' then
cycle_reload <= to_cycles(async_timespec.T_pulse_wr, f_sysclk) - 1;
else
cycle_reload <= to_cycles(async_timespec.T_pulse_rd, f_sysclk) - 1;
end if;
end if;
when pulse =>
as.cs <= '1';
as.rd <= not WE_I_r;
as.drive_d <= WE_I_r;
as.wr <= WE_I_r;
if cycle_cnt = 0 then
as.wr <= '0';
cc_rst <= '1';
ack <= not WE_I_r;
rdy <= do_page_read;
if en = '1' and do_page_read = '1' then
cycle_reload <= to_cycles(async_timespec.T_pulse_page_rd, f_sysclk) - 1;
sn <= pulse;
elsif to_cycles(async_timespec.T_leadout, f_sysclk) = 0 then
if to_cycles(async_timespec.T_release, f_sysclk) = 0 then
sn <= idle;
else
cycle_reload <= to_cycles(async_timespec.T_release, f_sysclk) - 1;
sn <= release;
end if;
else
cycle_reload <= to_cycles(async_timespec.T_leadout, f_sysclk) - 1;
sn <= leadout;
end if;
end if;
when leadout =>
as.cs <= '1';
as.drive_d <= WE_I_r;
if cycle_cnt = 0 then
cc_rst <= '1';
if to_cycles(async_timespec.T_release, f_sysclk) = 0 then
sn <= idle;
else
cycle_reload <= to_cycles(async_timespec.T_release, f_sysclk) - 1;
sn <= release;
end if;
end if;
when release =>
if cycle_cnt = 0 then
sn <= idle;
end if;
when others =>
sn <= idle;
end case;
end process;
------------------------------------------------------------------
output_ctrl:
process(CLK_I)
begin
if rising_edge(CLK_I) then
async_cs <= (not async_timespec.pol_cs) xor as.cs;
async_wr <= (not async_timespec.pol_we) xor as.wr;
async_rd <= (not async_timespec.pol_oe) xor as.rd;
async_rst <= (not async_timespec.pol_rst) xor as.rst;
end if;
end process;
------------------------------------------------------------------
din_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if as.rd = '1' then
DAT_O(data_width-1 downto 0) <= async_d;
end if;
end if;
end process;
------------------------------------------------------------------
output_addr:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
async_a <= (others => '0');
SEL_I_r <= (others => '0');
elsif en = '1' and rdy = '1' then
async_a <= ADDR_I(addr_width-1 downto 0);
async_be <= (byte_sel_width-1 downto 0 => not async_timespec.pol_be) xor ((byte_sel_width-1 downto 0 => as.cs) and SEL_I(byte_sel_width-1 downto 0));
SEL_I_r <= SEL_I(byte_sel_width-1 downto 0);
if is_idle = '1' then
ADDR_I_r <= ADDR_I(addr_width-1 downto 0);
end if;
end if;
end if;
end process;
------------------------------------------------------------------
data_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
page_mode_en_r <= page_mode_en;
if en = '1' and rdy = '1' then
DAT_I_r <= DAT_I(data_width-1 downto 0);
WE_I_r <= WE_I;
end if;
end if;
end process;
------------------------------------------------------------------
output_SRDY:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
rdyo <= '1';
elsif en = '1' then
rdyo <= rdy and not rdyo;
end if;
end if;
end process;
------------------------------------------------------------------
output_ACK:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
ACK_O <= '0';
else
ACK_O <= ack;
end if;
end if;
end process;
------------------------------------------------------------------
output_data:
process(CLK_I)
begin
if rising_edge(CLK_I) then
async_d <= (others => 'Z');
if as.drive_d = '1' then
async_d <= DAT_I_r;
end if;
end if;
end process;
------------------------------------------------------------------
end Behavioral;
+60
View File
@@ -0,0 +1,60 @@
-------------------------------------------------------------------------
-- Project: MIPS System controller
-- This file:
--
-- Copyright (C) 2008 J. Ahrensfeld
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- For questions and ideas, please contact the author at jens@jayfield.org
--
--------------------------------------------------------------------------
library IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
USE IEEE.MATH_REAL.ALL;
package async_types is
type async_timespec_t is record
T_leadin : real;
T_pulse_rd : real;
T_pulse_wr : real;
T_leadout : real;
T_release : real;
T_pulse_rst : real;
T_pulse_page_rd : real;
can_page_rd : boolean;
nbits_page_rd : natural;
pol_cs : std_logic;
pol_oe : std_logic;
pol_we : std_logic;
pol_be : std_logic;
pol_rst : std_logic;
end record;
function to_cycles(T_ns : real; f_Mhz : real) return natural;
end async_types;
package body async_types is
function to_cycles(T_ns : real; f_Mhz : real) return natural is
begin
return natural(ceil(1.0E-3*T_ns*f_Mhz));
end to_cycles;
end async_types;
+79
View File
@@ -0,0 +1,79 @@
-------------------------------------------------------------------------
-- Project: JCPU, a portable 8-bit RISC CPU written in VHDL
-- This file: Dual-ported register file with asynchrous read
-- Copyright (C) 2007 J. Ahrensfeld
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-- For questions and ideas, please contact the author at jens@jayfield.org
-----------------------------------------------------------------------
-- $Header: /tmp/cvsroot/VHDL/lib/misc/dpram_1w1r.vhd,v 1.1 2008-08-23 08:20:29 Jens Exp $
-----------------------------------------------------------------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
entity dpram_1w1r is
Generic (
addr_width : integer := 3;
data_width : integer := 8
);
Port (
clka : in STD_LOGIC;
clkb : in STD_LOGIC;
en_a : in STD_LOGIC;
en_b : in STD_LOGIC;
we_a : in STD_LOGIC;
addr_a : in unsigned (addr_width-1 downto 0);
addr_b : in unsigned (addr_width-1 downto 0);
din_a : in unsigned (data_width-1 downto 0);
dout_b : out unsigned (data_width-1 downto 0)
);
end dpram_1w1r;
architecture Behavioral of dpram_1w1r is
constant depth : integer := 2**addr_width;
type RAMtype is array (0 to depth-1) of unsigned (data_width-1 downto 0);
signal RAM : RAMtype;
begin
process (clka)
begin
if clka'event and clka = '1' then
if en_a = '1' then
if we_a = '1' then
RAM(to_integer(addr_a)) <= din_a;
end if;
end if;
end if;
end process;
process (clkb)
begin
if clkb'event and clkb = '1' then
if en_b = '1' then
dout_b <= RAM(to_integer(addr_b));
end if;
end if;
end process;
end Behavioral;
+88
View File
@@ -0,0 +1,88 @@
-------------------------------------------------------------------------
-- Project: JCPU, a portable 8-bit RISC CPU written in VHDL
-- This file: Dual-ported register file with asynchrous read
-- Copyright (C) 2007 J. Ahrensfeld
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-- For questions and ideas, please contact the author at jens@jayfield.org
-----------------------------------------------------------------------
-- $Header: /tmp/cvsroot/VHDL/lib/misc/dpram_2w2r.vhd,v 1.2 2009-01-14 20:26:29 Jens Exp $
-----------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
entity dpram_2w2r is
Generic
(
addr_width : integer := 3;
data_width : integer := 8
);
Port
(
clk_a : in STD_LOGIC;
clk_b : in STD_LOGIC;
en_a : in STD_LOGIC;
en_b : in STD_LOGIC;
we_a : in STD_LOGIC;
we_b : in STD_LOGIC;
addr_a : in unsigned (addr_width-1 downto 0);
addr_b : in unsigned (addr_width-1 downto 0);
din_a : in unsigned (data_width-1 downto 0);
din_b : in unsigned (data_width-1 downto 0);
dout_a : out unsigned (data_width-1 downto 0);
dout_b : out unsigned (data_width-1 downto 0)
);
end dpram_2w2r;
architecture Behavioral of dpram_2w2r is
constant depth : integer := 2**addr_width;
type RAMtype is array (0 to depth-1) of unsigned (data_width-1 downto 0);
shared variable RAM : RAMtype;
begin
process (clk_a)
begin
if clk_a'event and clk_a = '1' then
if en_a = '1' then
if we_a = '1' then
RAM(to_integer(addr_a)) := din_a;
end if;
dout_a <= RAM(to_integer(addr_a));
end if;
end if;
end process;
process (clk_b)
begin
if clk_b'event and clk_b = '1' then
if en_b = '1' then
if we_b = '1' then
RAM(to_integer(addr_b)) := din_b;
end if;
dout_b <= RAM(to_integer(addr_b));
end if;
end if;
end process;
end Behavioral;
+309
View File
@@ -0,0 +1,309 @@
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
ENTITY gpio_wb IS
Generic
(
f_sysclk : real := 100.0
);
Port
(
CLK_I : in STD_LOGIC;
RST_I : in STD_LOGIC;
CYC_I : in STD_LOGIC;
STB_I : in STD_LOGIC;
SEL_I : in unsigned(3 downto 0);
WE_I : in STD_LOGIC;
ACK_O : out STD_LOGIC;
SRDY_O : out STD_LOGIC;
MRDY_I : in STD_LOGIC;
ADDR_I : in unsigned(31 downto 0);
DAT_I : in unsigned(31 downto 0);
DAT_O : out unsigned(31 downto 0);
INT_TIM_O : out STD_LOGIC;
sys_gpi_0 : in unsigned(31 downto 0);
sys_gpo_0 : out unsigned(31 downto 0)
);
END gpio_wb;
ARCHITECTURE behavior OF gpio_wb IS
constant num_timers : natural := 2;
constant ncycles_usec : natural := natural(f_sysclk);
signal gpio_0_dout_reg : unsigned(31 downto 0);
signal gpio_0_dir_reg : unsigned(31 downto 0);
signal gpio_0_din_reg : unsigned(31 downto 0);
-- Signals to form an timer generating an interrupt every microsecond
subtype tick_usec_t is natural range 0 to ncycles_usec-1;
signal tick_usec : tick_usec_t := 0;
signal cnt_usec : unsigned(31 downto 0);
signal cnt_sec : unsigned(31 downto 0);
signal cnt_usec_preset : unsigned(31 downto 0);
signal cnt_sec_preset : unsigned(31 downto 0);
signal cnt_usec_en : std_logic;
signal cnt_usec_we : std_logic;
signal cnt_sec_en : std_logic;
signal cnt_sec_we : std_logic;
type timer_array_t is array (0 to num_timers-1) of unsigned(31 downto 0);
signal timer_cnt : timer_array_t;
signal timer_cmp : timer_array_t;
signal timer_en : unsigned(0 to num_timers-1);
signal timer_inten : unsigned(0 to num_timers-1);
signal timer_irq : unsigned(0 to num_timers-1);
signal timer_ovl : unsigned(0 to num_timers-1);
signal timer_irq_ack : unsigned(0 to num_timers-1);
signal timer_cnt_we : unsigned(0 to num_timers-1);
signal timer_cmp_we : unsigned(0 to num_timers-1);
signal reg_data_wr : unsigned(31 downto 0);
begin
SRDY_O <= CYC_I;
tim_irq:
process(timer_irq)
variable irq : std_logic;
begin
irq := '0';
for i in 0 to num_timers-1 loop
irq := irq or timer_irq(i);
end loop;
INT_TIM_O <= irq;
end process;
------------------------------------------------------------------
gpio_0_out:
process(gpio_0_dir_reg, gpio_0_dout_reg)
begin
for i in 0 to 31 loop
sys_gpo_0(i) <= 'Z';
if gpio_0_dir_reg(i) = '1' then
sys_gpo_0(i) <= gpio_0_dout_reg(i);
end if;
end loop;
end process;
------------------------------------------------------------------
gpio_0_in:
process(CLK_I)
begin
if rising_edge(CLK_I) then
for i in 0 to 31 loop
if gpio_0_dir_reg(i) = '1' then
gpio_0_din_reg(i) <= gpio_0_dout_reg(i);
else
gpio_0_din_reg(i) <= sys_gpi_0(i);
end if;
end loop;
end if;
end process;
------------------------------------------------------------------
registers_write:
process(CLK_I)
begin
if rising_edge(CLK_I) then
cnt_usec_we <= '0';
cnt_sec_we <= '0';
timer_cnt_we <= (others => '0');
timer_cmp_we <= (others => '0');
timer_irq_ack <= (others => '0');
if RST_I = '1' then
gpio_0_dout_reg <= (others => '0');
gpio_0_dir_reg <= (others => '0');
timer_en <= (others => '0');
timer_inten <= (others => '0');
elsif (STB_I and CYC_I and WE_I) = '1' then
reg_data_wr <= DAT_I;
case ADDR_I(6 downto 2) is
when "00000" =>
gpio_0_dout_reg <= DAT_I;
when "00001" =>
gpio_0_dir_reg <= DAT_I;
when "00010" =>
cnt_usec_we <= '1';
when "00011" =>
cnt_sec_we <= '1';
when "00110" => -- timer control
for i in 0 to num_timers-1 loop
timer_en(i) <= DAT_I(2*i+0);
timer_inten(i) <= DAT_I(2*i+1);
end loop;
when "00111" => -- timer status
for i in 0 to num_timers-1 loop
timer_irq_ack(i) <= DAT_I(2*i); -- IRQ acknowledge
end loop;
when "01000" => -- timer count 0
timer_cnt_we(0) <= '1';
when "01001" => -- timer count 1
timer_cnt_we(1) <= '1';
when "01100" => -- timer compare 0
timer_cmp_we(0) <= '1';
when "01101" => -- timer compare 1
timer_cmp_we(1) <= '1';
when others => null;
end case;
end if;
end if;
end process;
registers_read:
process(CLK_I)
begin
if rising_edge(CLK_I) then
ACK_O <= '0';
if (STB_I and CYC_I) = '1' then
ACK_O <= not WE_I;
DAT_O <= (others => '0');
case ADDR_I(6 downto 2) is
when "00000" =>
DAT_O <= gpio_0_din_reg;
when "00001" =>
DAT_O <= gpio_0_dir_reg;
when "00010" =>
DAT_O <= cnt_usec;
when "00011" =>
DAT_O <= cnt_sec;
when "00110" => -- timer control
for i in 0 to num_timers-1 loop
DAT_O(2*i+0) <= timer_en(i);
DAT_O(2*i+1) <= timer_inten(i);
end loop;
when "00111" => -- timer status
for i in 0 to num_timers-1 loop
DAT_O(2*i+0) <= timer_irq(i);
DAT_O(2*i+1) <= timer_ovl(i);
end loop;
when "01000" => -- timer count 0
DAT_O <= timer_cnt(0);
when "01001" => -- timer count 1
DAT_O <= timer_cnt(1);
when "01100" => -- timer compare 0
DAT_O <= timer_cmp(0);
when "01101" => -- timer compare 1
DAT_O <= timer_cmp(1);
when others => null;
end case;
end if;
end if;
end process;
cnt_usec_tick:
process(CLK_I)
begin
if rising_edge(CLK_I) then
cnt_usec_en <= '0';
if tick_usec >= tick_usec_t'high then
tick_usec <= 0;
cnt_usec_en <= '1';
else
tick_usec <= tick_usec + 1;
end if;
end if;
end process;
-- H/W Clock
cnt_usec_clock:
process(CLK_I)
begin
if rising_edge(CLK_I) then
cnt_sec_en <= '0';
if cnt_usec_we = '1' then
cnt_usec <= reg_data_wr;
elsif cnt_usec_en = '1' then
if to_01(cnt_usec) >= to_unsigned(1E6 - 1, 32) then
cnt_usec <= (others => '0');
cnt_sec_en <= '1';
else
cnt_usec <= cnt_usec + 1;
end if;
end if;
end if;
end process;
cnt_sec_clock:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if cnt_sec_we = '1' then
cnt_sec <= reg_data_wr;
elsif cnt_sec_en = '1' then
cnt_sec <= cnt_sec + 1;
end if;
end if;
end process;
-- Interrupt timer
proc_int_timer:
process(CLK_I)
begin
if rising_edge(CLK_I) then
for i in 0 to num_timers-1 loop
if RST_I = '1' then
timer_ovl(i) <= '0';
timer_irq(i) <= '0';
elsif timer_irq_ack(i) = '1' then
timer_ovl(i) <= '0';
timer_irq(i) <= '0';
elsif timer_cnt_we(i) = '1' then
timer_cnt(i) <= reg_data_wr;
elsif timer_en(i) = '1' then
if to_01(timer_cnt(i)) >= timer_cmp(i) then
timer_cnt(i) <= (others => '0');
if timer_inten(i) = '1' then
if timer_irq(i) = '1' then
timer_ovl(i) <= '1';
end if;
timer_irq(i) <= '1';
end if;
else
timer_cnt(i) <= timer_cnt(i) + 1;
end if;
end if;
end loop;
end if;
end process;
proc_int_timer_reload:
process(CLK_I)
begin
if rising_edge(CLK_I) then
for i in 0 to num_timers-1 loop
if timer_cmp_we(i) = '1' then
timer_cmp(i) <= reg_data_wr;
end if;
end loop;
end if;
end process;
------------------------------------------------------------------
end behavior;
+61
View File
@@ -0,0 +1,61 @@
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
ENTITY rom_wb IS
Port
(
CLK_I : in STD_LOGIC;
RST_I : in STD_LOGIC;
CYC_I : in STD_LOGIC;
STB_I : in STD_LOGIC;
ACK_O : out STD_LOGIC;
MRDY_I : in STD_LOGIC;
SRDY_O : out STD_LOGIC;
ADDR_I : in unsigned(31 downto 0);
DAT_O : out unsigned(31 downto 0)
);
END rom_wb;
ARCHITECTURE behavior OF rom_wb IS
COMPONENT rom
PORT
(
clk : in STD_LOGIC;
ce : in STD_LOGIC;
addr : in unsigned(31 downto 0);
dout : out unsigned(31 downto 0)
);
END COMPONENT;
signal data_en : std_logic;
begin
data_en <= CYC_I and STB_I and MRDY_I;
SRDY_O <= CYC_I;
data_valid_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
ACK_O <= '0';
else
ACK_O <= data_en; -- and not WE_I;
end if;
end if;
end process;
inst_rom : rom
PORT MAP
(
clk => CLK_I,
ce => data_en,
addr => ADDR_I,
dout => DAT_O
);
end behavior;
+281
View File
@@ -0,0 +1,281 @@
-- 'Bucket Brigade' FIFO
-- 16 deep
-- 8-bit data
--
-- Version : 1.10
-- Version Date : 3rd December 2003
-- Reason : '--translate' directives changed to '--synthesis translate' directives
--
-- Version : 1.00
-- Version Date : 14th October 2002
--
-- Start of design entry : 14th October 2002
--
-- Ken Chapman
-- Xilinx Ltd
-- Benchmark House
-- 203 Brooklands Road
-- Weybridge
-- Surrey KT13 ORH
-- United Kingdom
--
-- chapman@xilinx.com
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2002. This code may be contain portions patented by other
-- third parties. By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard
-- is free from any claims of infringement by any third party. Xilinx expressly
-- disclaims any warranty with respect to the adequacy of the implementation, including
-- but not limited to any warranty or representation that the implementation is free
-- from claims of any third party. Futhermore, Xilinx is providing this core as a
-- courtesy to you and suggests that you contact all third parties to obtain the
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- The Unisim Library is used to define Xilinx primitives. It is also used during
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
library unisim;
use unisim.vcomponents.all;
--
------------------------------------------------------------------------------------
--
-- Main Entity for BBFIFO_16x8
--
entity bbfifo_16x8 is
Port ( data_in : in std_logic_vector(7 downto 0);
data_out : out std_logic_vector(7 downto 0);
reset : in std_logic;
write : in std_logic;
read : in std_logic;
full : out std_logic;
half_full : out std_logic;
data_present : out std_logic;
clk : in std_logic);
end bbfifo_16x8;
--
------------------------------------------------------------------------------------
--
-- Start of Main Architecture for BBFIFO_16x8
--
architecture low_level_definition of bbfifo_16x8 is
--
------------------------------------------------------------------------------------
--
------------------------------------------------------------------------------------
--
-- Signals used in BBFIFO_16x8
--
------------------------------------------------------------------------------------
--
signal pointer : std_logic_vector(3 downto 0);
signal next_count : std_logic_vector(3 downto 0);
signal half_count : std_logic_vector(3 downto 0);
signal count_carry : std_logic_vector(2 downto 0);
signal pointer_zero : std_logic;
signal pointer_full : std_logic;
signal decode_data_present : std_logic;
signal data_present_int : std_logic;
signal valid_write : std_logic;
--
--
------------------------------------------------------------------------------------
--
-- Attributes to define LUT contents during implementation
-- The information is repeated in the generic map for functional simulation--
--
------------------------------------------------------------------------------------
--
attribute INIT : string;
attribute INIT of zero_lut : label is "0001";
attribute INIT of full_lut : label is "8000";
attribute INIT of dp_lut : label is "BFA0";
attribute INIT of valid_lut : label is "C4";
--
------------------------------------------------------------------------------------
--
-- Start of BBFIFO_16x8 circuit description
--
------------------------------------------------------------------------------------
--
begin
-- SRL16E data storage
data_width_loop: for i in 0 to 7 generate
--
attribute INIT : string;
attribute INIT of data_srl : label is "0000";
--
begin
data_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => data_in(i),
CE => valid_write,
CLK => clk,
A0 => pointer(0),
A1 => pointer(1),
A2 => pointer(2),
A3 => pointer(3),
Q => data_out(i) );
end generate data_width_loop;
-- 4-bit counter to act as data pointer
-- Counter is clock enabled by 'data_present'
-- Counter will be reset when 'reset' is active
-- Counter will increment when 'valid_write' is active
count_width_loop: for i in 0 to 3 generate
--
attribute INIT : string;
attribute INIT of count_lut : label is "6606";
--
begin
register_bit: FDRE
port map ( D => next_count(i),
Q => pointer(i),
CE => data_present_int,
R => reset,
C => clk);
count_lut: LUT4
--synthesis translate_off
generic map (INIT => X"6606")
--synthesis translate_on
port map( I0 => pointer(i),
I1 => read,
I2 => pointer_zero,
I3 => write,
O => half_count(i));
lsb_count: if i=0 generate
begin
count_muxcy: MUXCY
port map( DI => pointer(i),
CI => valid_write,
S => half_count(i),
O => count_carry(i));
count_xor: XORCY
port map( LI => half_count(i),
CI => valid_write,
O => next_count(i));
end generate lsb_count;
mid_count: if i>0 and i<3 generate
begin
count_muxcy: MUXCY
port map( DI => pointer(i),
CI => count_carry(i-1),
S => half_count(i),
O => count_carry(i));
count_xor: XORCY
port map( LI => half_count(i),
CI => count_carry(i-1),
O => next_count(i));
end generate mid_count;
upper_count: if i=3 generate
begin
count_xor: XORCY
port map( LI => half_count(i),
CI => count_carry(i-1),
O => next_count(i));
end generate upper_count;
end generate count_width_loop;
-- Detect when pointer is zero and maximum
zero_lut: LUT4
--synthesis translate_off
generic map (INIT => X"0001")
--synthesis translate_on
port map( I0 => pointer(0),
I1 => pointer(1),
I2 => pointer(2),
I3 => pointer(3),
O => pointer_zero );
full_lut: LUT4
--synthesis translate_off
generic map (INIT => X"8000")
--synthesis translate_on
port map( I0 => pointer(0),
I1 => pointer(1),
I2 => pointer(2),
I3 => pointer(3),
O => pointer_full );
-- Data Present status
dp_lut: LUT4
--synthesis translate_off
generic map (INIT => X"BFA0")
--synthesis translate_on
port map( I0 => write,
I1 => read,
I2 => pointer_zero,
I3 => data_present_int,
O => decode_data_present );
dp_flop: FDR
port map ( D => decode_data_present,
Q => data_present_int,
R => reset,
C => clk);
-- Valid write signal
valid_lut: LUT3
--synthesis translate_off
generic map (INIT => X"C4")
--synthesis translate_on
port map( I0 => pointer_full,
I1 => write,
I2 => read,
O => valid_write );
-- assign internal signals to outputs
full <= pointer_full;
half_full <= pointer(3);
data_present <= data_present_int;
end low_level_definition;
------------------------------------------------------------------------------------
--
-- END OF FILE BBFIFO_16x8.VHD
--
------------------------------------------------------------------------------------
+352
View File
@@ -0,0 +1,352 @@
-- Constant (K) Compact UART Receiver
--
-- Version : 1.10
-- Version Date : 3rd December 2003
-- Reason : '--translate' directives changed to '--synthesis translate' directives
--
-- Version : 1.00
-- Version Date : 16th October 2002
--
-- Start of design entry : 16th October 2002
--
-- Ken Chapman
-- Xilinx Ltd
-- Benchmark House
-- 203 Brooklands Road
-- Weybridge
-- Surrey KT13 ORH
-- United Kingdom
--
-- chapman@xilinx.com
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2002. This code may be contain portions patented by other
-- third parties. By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard
-- is free from any claims of infringement by any third party. Xilinx expressly
-- disclaims any warranty with respect to the adequacy of the implementation, including
-- but not limited to any warranty or representation that the implementation is free
-- from claims of any third party. Futhermore, Xilinx is providing this core as a
-- courtesy to you and suggests that you contact all third parties to obtain the
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- The Unisim Library is used to define Xilinx primitives. It is also used during
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
library unisim;
use unisim.vcomponents.all;
--
------------------------------------------------------------------------------------
--
-- Main Entity for KCUART_RX
--
entity kcuart_rx is
Port ( serial_in : in std_logic;
data_out : out std_logic_vector(7 downto 0);
data_strobe : out std_logic;
en_16_x_baud : in std_logic;
clk : in std_logic);
end kcuart_rx;
--
------------------------------------------------------------------------------------
--
-- Start of Main Architecture for KCUART_RX
--
architecture low_level_definition of kcuart_rx is
--
------------------------------------------------------------------------------------
--
------------------------------------------------------------------------------------
--
-- Signals used in KCUART_RX
--
------------------------------------------------------------------------------------
--
signal sync_serial : std_logic;
signal stop_bit : std_logic;
signal data_int : std_logic_vector(7 downto 0);
signal data_delay : std_logic_vector(7 downto 0);
signal start_delay : std_logic;
signal start_bit : std_logic;
signal edge_delay : std_logic;
signal start_edge : std_logic;
signal decode_valid_char : std_logic;
signal valid_char : std_logic;
signal decode_purge : std_logic;
signal purge : std_logic;
signal valid_srl_delay : std_logic_vector(8 downto 0);
signal valid_reg_delay : std_logic_vector(8 downto 0);
signal decode_data_strobe : std_logic;
--
--
------------------------------------------------------------------------------------
--
-- Attributes to define LUT contents during implementation
-- The information is repeated in the generic map for functional simulation--
--
------------------------------------------------------------------------------------
--
attribute INIT : string;
attribute INIT of start_srl : label is "0000";
attribute INIT of edge_srl : label is "0000";
attribute INIT of valid_lut : label is "0040";
attribute INIT of purge_lut : label is "54";
attribute INIT of strobe_lut : label is "8";
--
------------------------------------------------------------------------------------
--
-- Start of KCUART_RX circuit description
--
------------------------------------------------------------------------------------
--
begin
-- Synchronise input serial data to system clock
sync_reg: FD
port map ( D => serial_in,
Q => sync_serial,
C => clk);
stop_reg: FD
port map ( D => sync_serial,
Q => stop_bit,
C => clk);
-- Data delays to capture data at 16 time baud rate
-- Each SRL16E is followed by a flip-flop for best timing
data_loop: for i in 0 to 7 generate
begin
lsbs: if i<7 generate
--
attribute INIT : string;
attribute INIT of delay15_srl : label is "0000";
--
begin
delay15_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => data_int(i+1),
CE => en_16_x_baud,
CLK => clk,
A0 => '0',
A1 => '1',
A2 => '1',
A3 => '1',
Q => data_delay(i) );
end generate lsbs;
msb: if i=7 generate
--
attribute INIT : string;
attribute INIT of delay15_srl : label is "0000";
--
begin
delay15_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => stop_bit,
CE => en_16_x_baud,
CLK => clk,
A0 => '0',
A1 => '1',
A2 => '1',
A3 => '1',
Q => data_delay(i) );
end generate msb;
data_reg: FDE
port map ( D => data_delay(i),
Q => data_int(i),
CE => en_16_x_baud,
C => clk);
end generate data_loop;
-- Assign internal signals to outputs
data_out <= data_int;
-- Data delays to capture start bit at 16 time baud rate
start_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => data_int(0),
CE => en_16_x_baud,
CLK => clk,
A0 => '0',
A1 => '1',
A2 => '1',
A3 => '1',
Q => start_delay );
start_reg: FDE
port map ( D => start_delay,
Q => start_bit,
CE => en_16_x_baud,
C => clk);
-- Data delays to capture start bit leading edge at 16 time baud rate
-- Delay ensures data is captured at mid-bit position
edge_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => start_bit,
CE => en_16_x_baud,
CLK => clk,
A0 => '1',
A1 => '0',
A2 => '1',
A3 => '0',
Q => edge_delay );
edge_reg: FDE
port map ( D => edge_delay,
Q => start_edge,
CE => en_16_x_baud,
C => clk);
-- Detect a valid character
valid_lut: LUT4
--synthesis translate_off
generic map (INIT => X"0040")
--synthesis translate_on
port map( I0 => purge,
I1 => stop_bit,
I2 => start_edge,
I3 => edge_delay,
O => decode_valid_char );
valid_reg: FDE
port map ( D => decode_valid_char,
Q => valid_char,
CE => en_16_x_baud,
C => clk);
-- Purge of data status
purge_lut: LUT3
--synthesis translate_off
generic map (INIT => X"54")
--synthesis translate_on
port map( I0 => valid_reg_delay(8),
I1 => valid_char,
I2 => purge,
O => decode_purge );
purge_reg: FDE
port map ( D => decode_purge,
Q => purge,
CE => en_16_x_baud,
C => clk);
-- Delay of valid_char pulse of length equivalent to the time taken
-- to purge data shift register of all data which has been used.
-- Requires 9x16 + 8 delays which is achieved by packing of SRL16E with
-- up to 16 delays and utilising the dedicated flip flop in each stage.
valid_loop: for i in 0 to 8 generate
begin
lsb: if i=0 generate
--
attribute INIT : string;
attribute INIT of delay15_srl : label is "0000";
--
begin
delay15_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => valid_char,
CE => en_16_x_baud,
CLK => clk,
A0 => '0',
A1 => '1',
A2 => '1',
A3 => '1',
Q => valid_srl_delay(i) );
end generate lsb;
msbs: if i>0 generate
--
attribute INIT : string;
attribute INIT of delay16_srl : label is "0000";
--
begin
delay16_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => valid_reg_delay(i-1),
CE => en_16_x_baud,
CLK => clk,
A0 => '1',
A1 => '1',
A2 => '1',
A3 => '1',
Q => valid_srl_delay(i) );
end generate msbs;
data_reg: FDE
port map ( D => valid_srl_delay(i),
Q => valid_reg_delay(i),
CE => en_16_x_baud,
C => clk);
end generate valid_loop;
-- Form data strobe
strobe_lut: LUT2
--synthesis translate_off
generic map (INIT => X"8")
--synthesis translate_on
port map( I0 => valid_char,
I1 => en_16_x_baud,
O => decode_data_strobe );
strobe_reg: FD
port map ( D => decode_data_strobe,
Q => data_strobe,
C => clk);
end low_level_definition;
------------------------------------------------------------------------------------
--
-- END OF FILE KCUART_RX.VHD
--
------------------------------------------------------------------------------------
+394
View File
@@ -0,0 +1,394 @@
-- Constant (K) Compact UART Transmitter
--
-- Version : 1.10
-- Version Date : 3rd December 2003
-- Reason : '--translate' directives changed to '--synthesis translate' directives
--
-- Version : 1.00
-- Version Date : 14th October 2002
--
-- Start of design entry : 2nd October 2002
--
-- Ken Chapman
-- Xilinx Ltd
-- Benchmark House
-- 203 Brooklands Road
-- Weybridge
-- Surrey KT13 ORH
-- United Kingdom
--
-- chapman@xilinx.com
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2002. This code may be contain portions patented by other
-- third parties. By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard
-- is free from any claims of infringement by any third party. Xilinx expressly
-- disclaims any warranty with respect to the adequacy of the implementation, including
-- but not limited to any warranty or representation that the implementation is free
-- from claims of any third party. Futhermore, Xilinx is providing this core as a
-- courtesy to you and suggests that you contact all third parties to obtain the
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- The Unisim Library is used to define Xilinx primitives. It is also used during
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
library unisim;
use unisim.vcomponents.all;
--
------------------------------------------------------------------------------------
--
-- Main Entity for KCUART_TX
--
entity kcuart_tx is
Port ( data_in : in std_logic_vector(7 downto 0);
send_character : in std_logic;
en_16_x_baud : in std_logic;
serial_out : out std_logic;
Tx_complete : out std_logic;
clk : in std_logic);
end kcuart_tx;
--
------------------------------------------------------------------------------------
--
-- Start of Main Architecture for KCUART_TX
--
architecture low_level_definition of kcuart_tx is
--
------------------------------------------------------------------------------------
--
------------------------------------------------------------------------------------
--
-- Signals used in KCUART_TX
--
------------------------------------------------------------------------------------
--
signal data_01 : std_logic;
signal data_23 : std_logic;
signal data_45 : std_logic;
signal data_67 : std_logic;
signal data_0123 : std_logic;
signal data_4567 : std_logic;
signal data_01234567 : std_logic;
signal bit_select : std_logic_vector(2 downto 0);
signal next_count : std_logic_vector(2 downto 0);
signal mask_count : std_logic_vector(2 downto 0);
signal mask_count_carry : std_logic_vector(2 downto 0);
signal count_carry : std_logic_vector(2 downto 0);
signal ready_to_start : std_logic;
signal decode_Tx_start : std_logic;
signal Tx_start : std_logic;
signal decode_Tx_run : std_logic;
signal Tx_run : std_logic;
signal decode_hot_state : std_logic;
signal hot_state : std_logic;
signal hot_delay : std_logic;
signal Tx_bit : std_logic;
signal decode_Tx_stop : std_logic;
signal Tx_stop : std_logic;
signal decode_Tx_complete : std_logic;
--
--
------------------------------------------------------------------------------------
--
-- Attributes to define LUT contents during implementation
-- The information is repeated in the generic map for functional simulation--
--
------------------------------------------------------------------------------------
--
attribute INIT : string;
attribute INIT of mux1_lut : label is "E4FF";
attribute INIT of mux2_lut : label is "E4FF";
attribute INIT of mux3_lut : label is "E4FF";
attribute INIT of mux4_lut : label is "E4FF";
attribute INIT of ready_lut : label is "10";
attribute INIT of start_lut : label is "0190";
attribute INIT of run_lut : label is "1540";
attribute INIT of hot_state_lut : label is "94";
attribute INIT of delay14_srl : label is "0000";
attribute INIT of stop_lut : label is "0180";
attribute INIT of complete_lut : label is "8";
--
------------------------------------------------------------------------------------
--
-- Start of KCUART_TX circuit description
--
------------------------------------------------------------------------------------
--
begin
-- 8 to 1 multiplexer to convert parallel data to serial
mux1_lut: LUT4
--synthesis translate_off
generic map (INIT => X"E4FF")
--synthesis translate_on
port map( I0 => bit_select(0),
I1 => data_in(0),
I2 => data_in(1),
I3 => Tx_run,
O => data_01 );
mux2_lut: LUT4
--synthesis translate_off
generic map (INIT => X"E4FF")
--synthesis translate_on
port map( I0 => bit_select(0),
I1 => data_in(2),
I2 => data_in(3),
I3 => Tx_run,
O => data_23 );
mux3_lut: LUT4
--synthesis translate_off
generic map (INIT => X"E4FF")
--synthesis translate_on
port map( I0 => bit_select(0),
I1 => data_in(4),
I2 => data_in(5),
I3 => Tx_run,
O => data_45 );
mux4_lut: LUT4
--synthesis translate_off
generic map (INIT => X"E4FF")
--synthesis translate_on
port map( I0 => bit_select(0),
I1 => data_in(6),
I2 => data_in(7),
I3 => Tx_run,
O => data_67 );
mux5_muxf5: MUXF5
port map( I1 => data_23,
I0 => data_01,
S => bit_select(1),
O => data_0123 );
mux6_muxf5: MUXF5
port map( I1 => data_67,
I0 => data_45,
S => bit_select(1),
O => data_4567 );
mux7_muxf6: MUXF6
port map( I1 => data_4567,
I0 => data_0123,
S => bit_select(2),
O => data_01234567 );
-- Register serial output and force start and stop bits
pipeline_serial: FDRS
port map ( D => data_01234567,
Q => serial_out,
R => Tx_start,
S => Tx_stop,
C => clk);
-- 3-bit counter
-- Counter is clock enabled by en_16_x_baud
-- Counter will be reset when 'Tx_start' is active
-- Counter will increment when Tx_bit is active
-- Tx_run must be active to count
-- count_carry(2) indicates when terminal count (7) is reached and Tx_bit=1 (ie overflow)
count_width_loop: for i in 0 to 2 generate
--
attribute INIT : string;
attribute INIT of count_lut : label is "8";
--
begin
register_bit: FDRE
port map ( D => next_count(i),
Q => bit_select(i),
CE => en_16_x_baud,
R => Tx_start,
C => clk);
count_lut: LUT2
--synthesis translate_off
generic map (INIT => X"8")
--synthesis translate_on
port map( I0 => bit_select(i),
I1 => Tx_run,
O => mask_count(i));
mask_and: MULT_AND
port map( I0 => bit_select(i),
I1 => Tx_run,
LO => mask_count_carry(i));
lsb_count: if i=0 generate
begin
count_muxcy: MUXCY
port map( DI => mask_count_carry(i),
CI => Tx_bit,
S => mask_count(i),
O => count_carry(i));
count_xor: XORCY
port map( LI => mask_count(i),
CI => Tx_bit,
O => next_count(i));
end generate lsb_count;
upper_count: if i>0 generate
begin
count_muxcy: MUXCY
port map( DI => mask_count_carry(i),
CI => count_carry(i-1),
S => mask_count(i),
O => count_carry(i));
count_xor: XORCY
port map( LI => mask_count(i),
CI => count_carry(i-1),
O => next_count(i));
end generate upper_count;
end generate count_width_loop;
-- Ready to start decode
ready_lut: LUT3
--synthesis translate_off
generic map (INIT => X"10")
--synthesis translate_on
port map( I0 => Tx_run,
I1 => Tx_start,
I2 => send_character,
O => ready_to_start );
-- Start bit enable
start_lut: LUT4
--synthesis translate_off
generic map (INIT => X"0190")
--synthesis translate_on
port map( I0 => Tx_bit,
I1 => Tx_stop,
I2 => ready_to_start,
I3 => Tx_start,
O => decode_Tx_start );
Tx_start_reg: FDE
port map ( D => decode_Tx_start,
Q => Tx_start,
CE => en_16_x_baud,
C => clk);
-- Run bit enable
run_lut: LUT4
--synthesis translate_off
generic map (INIT => X"1540")
--synthesis translate_on
port map( I0 => count_carry(2),
I1 => Tx_bit,
I2 => Tx_start,
I3 => Tx_run,
O => decode_Tx_run );
Tx_run_reg: FDE
port map ( D => decode_Tx_run,
Q => Tx_run,
CE => en_16_x_baud,
C => clk);
-- Bit rate enable
hot_state_lut: LUT3
--synthesis translate_off
generic map (INIT => X"94")
--synthesis translate_on
port map( I0 => Tx_stop,
I1 => ready_to_start,
I2 => Tx_bit,
O => decode_hot_state );
hot_state_reg: FDE
port map ( D => decode_hot_state,
Q => hot_state,
CE => en_16_x_baud,
C => clk);
delay14_srl: SRL16E
--synthesis translate_off
generic map (INIT => X"0000")
--synthesis translate_on
port map( D => hot_state,
CE => en_16_x_baud,
CLK => clk,
A0 => '1',
A1 => '0',
A2 => '1',
A3 => '1',
Q => hot_delay );
Tx_bit_reg: FDE
port map ( D => hot_delay,
Q => Tx_bit,
CE => en_16_x_baud,
C => clk);
-- Stop bit enable
stop_lut: LUT4
--synthesis translate_off
generic map (INIT => X"0180")
--synthesis translate_on
port map( I0 => Tx_bit,
I1 => Tx_run,
I2 => count_carry(2),
I3 => Tx_stop,
O => decode_Tx_stop );
Tx_stop_reg: FDE
port map ( D => decode_Tx_stop,
Q => Tx_stop,
CE => en_16_x_baud,
C => clk);
-- Tx_complete strobe
complete_lut: LUT2
--synthesis translate_off
generic map (INIT => X"8")
--synthesis translate_on
port map( I0 => count_carry(2),
I1 => en_16_x_baud,
O => decode_Tx_complete );
Tx_complete_reg: FD
port map ( D => decode_Tx_complete,
Q => Tx_complete,
C => clk);
end low_level_definition;
------------------------------------------------------------------------------------
--
-- END OF FILE KCUART_TX.VHD
--
------------------------------------------------------------------------------------
+146
View File
@@ -0,0 +1,146 @@
-- UART Receiver with integral 16 byte FIFO buffer
--
-- 8 bit, no parity, 1 stop bit
--
-- Version : 1.00
-- Version Date : 16th October 2002
--
-- Start of design entry : 16th October 2002
--
-- Ken Chapman
-- Xilinx Ltd
-- Benchmark House
-- 203 Brooklands Road
-- Weybridge
-- Surrey KT13 ORH
-- United Kingdom
--
-- chapman@xilinx.com
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2002. This code may be contain portions patented by other
-- third parties. By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard
-- is free from any claims of infringement by any third party. Xilinx expressly
-- disclaims any warranty with respect to the adequacy of the implementation, including
-- but not limited to any warranty or representation that the implementation is free
-- from claims of any third party. Futhermore, Xilinx is providing this core as a
-- courtesy to you and suggests that you contact all third parties to obtain the
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- The Unisim Library is used to define Xilinx primitives. It is also used during
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
library unisim;
use unisim.vcomponents.all;
--
------------------------------------------------------------------------------------
--
-- Main Entity for UART_RX
--
entity uart_rx is
Port ( serial_in : in std_logic;
data_out : out std_logic_vector(7 downto 0);
read_buffer : in std_logic;
reset_buffer : in std_logic;
en_16_x_baud : in std_logic;
buffer_data_present : out std_logic;
buffer_full : out std_logic;
buffer_half_full : out std_logic;
clk : in std_logic);
end uart_rx;
--
------------------------------------------------------------------------------------
--
-- Start of Main Architecture for UART_RX
--
architecture macro_level_definition of uart_rx is
--
------------------------------------------------------------------------------------
--
-- Components used in UART_RX and defined in subsequent entities.
--
------------------------------------------------------------------------------------
--
-- Constant (K) Compact UART Receiver
--
component kcuart_rx
Port ( serial_in : in std_logic;
data_out : out std_logic_vector(7 downto 0);
data_strobe : out std_logic;
en_16_x_baud : in std_logic;
clk : in std_logic);
end component;
--
-- 'Bucket Brigade' FIFO
--
component bbfifo_16x8
Port ( data_in : in std_logic_vector(7 downto 0);
data_out : out std_logic_vector(7 downto 0);
reset : in std_logic;
write : in std_logic;
read : in std_logic;
full : out std_logic;
half_full : out std_logic;
data_present : out std_logic;
clk : in std_logic);
end component;
--
------------------------------------------------------------------------------------
--
-- Signals used in UART_RX
--
------------------------------------------------------------------------------------
--
signal uart_data_out : std_logic_vector(7 downto 0);
signal fifo_write : std_logic;
--
------------------------------------------------------------------------------------
--
-- Start of UART_RX circuit description
--
------------------------------------------------------------------------------------
--
begin
-- 8 to 1 multiplexer to convert parallel data to serial
kcuart: kcuart_rx
port map ( serial_in => serial_in,
data_out => uart_data_out,
data_strobe => fifo_write,
en_16_x_baud => en_16_x_baud,
clk => clk );
buf: bbfifo_16x8
port map ( data_in => uart_data_out,
data_out => data_out,
reset => reset_buffer,
write => fifo_write,
read => read_buffer,
full => buffer_full,
half_full => buffer_half_full,
data_present => buffer_data_present,
clk => clk);
end macro_level_definition;
------------------------------------------------------------------------------------
--
-- END OF FILE UART_RX.VHD
--
------------------------------------------------------------------------------------
+153
View File
@@ -0,0 +1,153 @@
-- UART Transmitter with integral 16 byte FIFO buffer
--
-- 8 bit, no parity, 1 stop bit
--
-- Version : 1.00
-- Version Date : 14th October 2002
--
-- Start of design entry : 14th October 2002
--
-- Ken Chapman
-- Xilinx Ltd
-- Benchmark House
-- 203 Brooklands Road
-- Weybridge
-- Surrey KT13 ORH
-- United Kingdom
--
-- chapman@xilinx.com
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2002. This code may be contain portions patented by other
-- third parties. By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard
-- is free from any claims of infringement by any third party. Xilinx expressly
-- disclaims any warranty with respect to the adequacy of the implementation, including
-- but not limited to any warranty or representation that the implementation is free
-- from claims of any third party. Futhermore, Xilinx is providing this core as a
-- courtesy to you and suggests that you contact all third parties to obtain the
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- The Unisim Library is used to define Xilinx primitives. It is also used during
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
library unisim;
use unisim.vcomponents.all;
--
------------------------------------------------------------------------------------
--
-- Main Entity for UART_TX
--
entity uart_tx is
Port ( data_in : in std_logic_vector(7 downto 0);
write_buffer : in std_logic;
reset_buffer : in std_logic;
en_16_x_baud : in std_logic;
serial_out : out std_logic;
buffer_full : out std_logic;
buffer_half_full : out std_logic;
tx_complete : out std_logic;
tx_empty : out std_logic;
clk : in std_logic);
end uart_tx;
--
------------------------------------------------------------------------------------
--
-- Start of Main Architecture for UART_TX
--
architecture macro_level_definition of uart_tx is
--
------------------------------------------------------------------------------------
--
-- Components used in UART_TX and defined in subsequent entities.
--
------------------------------------------------------------------------------------
--
-- Constant (K) Compact UART Transmitter
--
component kcuart_tx
Port ( data_in : in std_logic_vector(7 downto 0);
send_character : in std_logic;
en_16_x_baud : in std_logic;
serial_out : out std_logic;
Tx_complete : out std_logic;
clk : in std_logic);
end component;
--
-- 'Bucket Brigade' FIFO
--
component bbfifo_16x8
Port ( data_in : in std_logic_vector(7 downto 0);
data_out : out std_logic_vector(7 downto 0);
reset : in std_logic;
write : in std_logic;
read : in std_logic;
full : out std_logic;
half_full : out std_logic;
data_present : out std_logic;
clk : in std_logic);
end component;
--
------------------------------------------------------------------------------------
--
-- Signals used in UART_TX
--
------------------------------------------------------------------------------------
--
signal fifo_data_out : std_logic_vector(7 downto 0);
signal fifo_data_present : std_logic;
signal fifo_read : std_logic;
--
------------------------------------------------------------------------------------
--
-- Start of UART_TX circuit description
--
------------------------------------------------------------------------------------
--
begin
tx_complete <= fifo_read;
tx_empty <= not fifo_data_present;
-- 8 to 1 multiplexer to convert parallel data to serial
kcuart: kcuart_tx
port map ( data_in => fifo_data_out,
send_character => fifo_data_present,
en_16_x_baud => en_16_x_baud,
serial_out => serial_out,
Tx_complete => fifo_read,
clk => clk);
buf: bbfifo_16x8
port map ( data_in => data_in,
data_out => fifo_data_out,
reset => reset_buffer,
write => write_buffer,
read => fifo_read,
full => buffer_full,
half_full => buffer_half_full,
data_present => fifo_data_present,
clk => clk);
end macro_level_definition;
------------------------------------------------------------------------------------
--
-- END OF FILE UART_TX.VHD
--
------------------------------------------------------------------------------------
+214
View File
@@ -0,0 +1,214 @@
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.NUMERIC_STD.ALL;
use std.textio.all; -- Imports the standard textio package.
ENTITY uart_wb IS
Generic
(
simulate_tx : boolean := false
);
Port
(
CLK_I : in STD_LOGIC;
RST_I : in STD_LOGIC;
INT_O : out STD_LOGIC;
CYC_I : in STD_LOGIC;
STB_I : in STD_LOGIC;
SEL_I : in unsigned(3 downto 0);
WE_I : in STD_LOGIC;
ACK_O : out STD_LOGIC;
SRDY_O : out STD_LOGIC;
MRDY_I : in STD_LOGIC;
ADDR_I : in unsigned(31 downto 0);
DAT_I : in unsigned(31 downto 0);
DAT_O : out unsigned(31 downto 0);
ser_rx : in std_logic;
ser_tx : out std_logic
);
END uart_wb;
ARCHITECTURE behavior OF uart_wb IS
COMPONENT uart_tx
Port
(
data_in : in std_logic_vector(7 downto 0);
write_buffer : in std_logic;
reset_buffer : in std_logic;
en_16_x_baud : in std_logic;
serial_out : out std_logic;
buffer_full : out std_logic;
buffer_half_full : out std_logic;
tx_complete : out std_logic;
tx_empty : out std_logic;
clk : in std_logic
);
END COMPONENT;
COMPONENT uart_rx
Port
(
serial_in : in std_logic;
data_out : out std_logic_vector(7 downto 0);
read_buffer : in std_logic;
reset_buffer : in std_logic;
en_16_x_baud : in std_logic;
buffer_data_present : out std_logic;
buffer_full : out std_logic;
buffer_half_full : out std_logic;
clk : in std_logic
);
END COMPONENT;
-- Signals for UART connections
signal baud_count : unsigned(15 downto 0);
signal en_16_x_baud : std_logic;
signal reg_we_uart_tx : std_logic;
signal tx_full : std_logic;
signal tx_half_full : std_logic;
signal reg_re_uart_rx : std_logic;
signal reg_uart_tx : unsigned(7 downto 0);
signal reg_uart_rx : std_logic_vector(7 downto 0);
signal rx_data_present : std_logic;
signal rx_full : std_logic;
signal rx_half_full : std_logic;
signal uart_status_port : unsigned(15 downto 0);
signal reg_uart_baud : unsigned(15 downto 0);
signal rx_int_en : std_logic;
signal tx_int_en : std_logic;
signal irq_rx : std_logic;
signal irq_tx : std_logic;
signal tx_complete : std_logic;
signal tx_empty : std_logic;
begin
SRDY_O <= CYC_I;
------------------------------------------------------------------
registers_write:
process(CLK_I)
file output: text open write_mode is "STD_OUTPUT";
variable L : line;
begin
if rising_edge(CLK_I) then
reg_we_uart_tx <= '0';
if RST_I = '1' then
reg_uart_baud <= to_unsigned(53, 16);
rx_int_en <= '0';
tx_int_en <= '0';
elsif (STB_I and CYC_I and WE_I) = '1' then
case ADDR_I(5 downto 2) is
when "0000" =>
if simulate_tx then
if DAT_I(7 downto 0) /= X"0D" then
write(L, character'val(to_integer(DAT_I(7 downto 0))));
end if;
if DAT_I(7 downto 0) = X"0A" then
writeline(output, L);
end if;
else
reg_we_uart_tx <= '1';
reg_uart_tx <= DAT_I(7 downto 0);
end if;
when "0001" =>
rx_int_en <= DAT_I(6);
tx_int_en <= DAT_I(5);
when "0010" =>
reg_uart_baud <= DAT_I(15 downto 0);
when others => null;
end case;
end if;
end if;
end process;
registers_read:
process(CLK_I)
begin
if rising_edge(CLK_I) then
reg_re_uart_rx <= '0';
ACK_O <= '0';
if (STB_I and CYC_I) = '1' then
ACK_O <= not WE_I;
DAT_O <= (others => '0');
case ADDR_I(5 downto 2) is
when "0000" =>
reg_re_uart_rx <= not WE_I;
DAT_O(7 downto 0) <= unsigned(reg_uart_rx);
when "0001" =>
DAT_O(15 downto 0) <= uart_status_port;
when "0010" =>
DAT_O(15 downto 0) <= reg_uart_baud;
when others => null;
end case;
end if;
end if;
end process;
baud_timer:
process(CLK_I)
begin
if rising_edge(CLK_I) then
if RST_I = '1' then
baud_count <= (others => '0');
elsif baud_count = reg_uart_baud then
baud_count <= (others => '0');
en_16_x_baud <= '1';
else
baud_count <= baud_count + 1;
en_16_x_baud <= '0';
end if;
end if;
end process;
irq_register:
process(CLK_I)
begin
if rising_edge(CLK_I) then
irq_tx <= tx_empty and tx_int_en;
irq_rx <= rx_data_present and rx_int_en;
end if;
end process;
inst_uart_tx: uart_tx
port map
(
data_in => std_logic_vector(reg_uart_tx),
write_buffer => reg_we_uart_tx,
reset_buffer => RST_I,
en_16_x_baud => en_16_x_baud,
serial_out => ser_tx,
buffer_full => tx_full,
buffer_half_full => tx_half_full,
tx_complete => tx_complete,
tx_empty => tx_empty,
clk => CLK_I
);
inst_uart_rx: uart_rx
port map
(
serial_in => ser_rx,
data_out => reg_uart_rx,
read_buffer => reg_re_uart_rx,
reset_buffer => RST_I,
en_16_x_baud => en_16_x_baud,
buffer_data_present => rx_data_present,
buffer_full => rx_full,
buffer_half_full => rx_half_full,
clk => CLK_I
);
uart_status_port <= "000000" & irq_rx & irq_tx & '0' & rx_int_en & tx_int_en & rx_data_present & rx_full & rx_half_full & tx_full & tx_half_full;
INT_O <= irq_rx or irq_tx;
end behavior;