From 5fbcc211b9c0df8d3274fc2d31f7332a57f33a61 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 9 Apr 2010 08:46:55 +0000 Subject: [PATCH] - 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 --- lib/emac/src/crc32.vhd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/emac/src/crc32.vhd b/lib/emac/src/crc32.vhd index 5a8cb22..c48cfb5 100644 --- a/lib/emac/src/crc32.vhd +++ b/lib/emac/src/crc32.vhd @@ -6,6 +6,10 @@ use std.textio.all; -- Imports the standard textio package. use work.utils_pkg.all; -- Imports the standard textio package. ENTITY crc32 IS + Generic + ( + crc32_init : unsigned(31 downto 0) := X"00000000" + ); Port ( rst : in STD_LOGIC; @@ -48,7 +52,7 @@ begin if rising_edge(clk) then crc32_vld <= not rst and din_vld; if rst = '1' then - crc0 <= (others => '0'); + crc0 <= crc32_init; elsif din_vld = '1' then crc0 <= crc2; end if;