Skip to content

Commit

Permalink
./emacs -f vhdl-beautify-buffer -f vhdl-update-sensitivity-list-buffe…
Browse files Browse the repository at this point in the history
…r -f save-buffer
  • Loading branch information
ruck314 committed Oct 2, 2024
1 parent 9250912 commit 5238204
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions base/crc/rtl/Crc32.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ use surf.CrcPkg.all;
entity Crc32 is
generic (
TPD_G : time := 1 ns;
RST_POLARITY_G : sl := '1'; -- '1' for active HIGH reset, '0' for active LOW reset
RST_POLARITY_G : sl := '1'; -- '1' for active HIGH reset, '0' for active LOW reset
RST_ASYNC_G : boolean := false;
BYTE_WIDTH_G : positive := 4;
INPUT_REGISTER_G : boolean := true;
CRC_INIT_G : slv(31 downto 0) := x"FFFFFFFF";
CRC_POLY_G : slv(31 downto 0) := x"04C11DB7");
port (
crcPwrOnRst : in sl := not RST_POLARITY_G;
crcOut : out slv(31 downto 0); -- CRC output
crcRem : out slv(31 downto 0); -- CRC interim remainder
crcPwrOnRst : in sl := not RST_POLARITY_G;
crcOut : out slv(31 downto 0); -- CRC output
crcRem : out slv(31 downto 0); -- CRC interim remainder
crcClk : in sl; -- system clock
crcDataValid : in sl; -- indicate that new data arrived and CRC can be computed
crcDataWidth : in slv(2 downto 0); -- indicate width in bytes minus 1, 0 - 1 byte, 1 - 2 bytes ... , 7 - 8 bytes
Expand Down Expand Up @@ -149,7 +149,7 @@ begin
begin
if (RST_ASYNC_G and crcPwrOnRst = RST_POLARITY_G) then
r <= REG_INIT_C after TPD_G;
elsif (rising_edge(crcClk)) then
elsif (rising_edge(crcClk)) then
if (RST_ASYNC_G = false and crcPwrOnRst = RST_POLARITY_G) then
r <= REG_INIT_C after TPD_G;
else
Expand Down
12 changes: 6 additions & 6 deletions base/crc/rtl/Crc32Parallel.vhd
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ use surf.CrcPkg.all;
entity Crc32Parallel is
generic (
TPD_G : time := 1 ns;
RST_POLARITY_G : sl := '1'; -- '1' for active HIGH reset, '0' for active LOW reset
RST_POLARITY_G : sl := '1'; -- '1' for active HIGH reset, '0' for active LOW reset
RST_ASYNC_G : boolean := false;
BYTE_WIDTH_G : positive := 4;
INPUT_REGISTER_G : boolean := true;
CRC_INIT_G : slv(31 downto 0) := x"FFFFFFFF");
port (
crcPwrOnRst : in sl := not RST_POLARITY_G;
crcOut : out slv(31 downto 0); -- CRC output
crcRem : out slv(31 downto 0); -- CRC interim remainder
crcPwrOnRst : in sl := not RST_POLARITY_G;
crcOut : out slv(31 downto 0); -- CRC output
crcRem : out slv(31 downto 0); -- CRC interim remainder
crcClk : in sl; -- system clock
crcDataValid : in sl; -- indicate that new data arrived and CRC can be computed
crcDataWidth : in slv(2 downto 0); -- indicate width in bytes minus 1, 0 - 1 byte, 1 - 2 bytes ... , 7 - 8 bytes
crcIn : in slv((BYTE_WIDTH_G*8-1) downto 0); -- input data for CRC calculation
crcInit : in slv(31 downto 0) := CRC_INIT_G; -- optional override of CRC_INIT_G
crcReset : in sl); -- initializes CRC logic to crcInit
crcReset : in sl); -- initializes CRC logic to crcInit
end Crc32Parallel;

architecture rtl of Crc32Parallel is
Expand Down Expand Up @@ -191,7 +191,7 @@ begin
begin
if (RST_ASYNC_G and crcPwrOnRst = RST_POLARITY_G) then
r <= REG_INIT_C after TPD_G;
elsif (rising_edge(crcClk)) then
elsif (rising_edge(crcClk)) then
if (RST_ASYNC_G = false and crcPwrOnRst = RST_POLARITY_G) then
r <= REG_INIT_C after TPD_G;
else
Expand Down
4 changes: 2 additions & 2 deletions base/sync/rtl/RstSync.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use surf.StdRtlPkg.all;

entity RstSync is
generic (
TPD_G : time := 1 ns; -- Simulation FF output delay
TPD_G : time := 1 ns; -- Simulation FF output delay
IN_POLARITY_G : std_logic := '1'; -- 0 for active low rst, 1 for high
OUT_POLARITY_G : std_logic := '1';
BYPASS_SYNC_G : boolean := false; -- Bypass Synchronizer module for synchronous data configuration
Expand Down Expand Up @@ -60,7 +60,7 @@ begin
dataOut => syncInt);

-- Final stage does not have async constraints applied, can be duplicated to ease timing
OUT_REG : process (clk, asyncRst) is
OUT_REG : process (asyncRst, clk) is
begin
if (asyncRst = IN_POLARITY_G and OUT_REG_RST_G) then
syncRst <= OUT_POLARITY_G after TPD_G;
Expand Down
4 changes: 2 additions & 2 deletions base/sync/rtl/SynchronizerFifo.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use surf.StdRtlPkg.all;
entity SynchronizerFifo is
generic (
TPD_G : time := 1 ns;
RST_POLARITY_G : sl := '1'; -- '1' for active HIGH reset, '0' for active LOW reset
RST_POLARITY_G : sl := '1'; -- '1' for active HIGH reset, '0' for active LOW reset
RST_ASYNC_G : boolean := false;
COMMON_CLK_G : boolean := false; -- Bypass FifoAsync module for synchronous data configuration
MEMORY_TYPE_G : string := "distributed";
Expand All @@ -34,7 +34,7 @@ entity SynchronizerFifo is
INIT_G : slv := "0");
port (
-- Asynchronous Reset
rst : in sl := not RST_POLARITY_G;
rst : in sl := not RST_POLARITY_G;
-- Write Ports (wr_clk domain)
wr_clk : in sl;
wr_en : in sl := '1';
Expand Down

0 comments on commit 5238204

Please sign in to comment.