Skip to content

Commit 0ceace9

Browse files
committed
Xilinx FPGAs: Eliminate Vivado critical warnings
This resolves various warnings and critical warnings from Vivado. In particular, the asynchronous loops in the xilinx hardware RNG were giving a lot of critical warnings, which proved to be difficult to suppress, so this instead makes all the xilinx platforms use the 'nonrandom.vhdl' implementation, which always returns an error. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
1 parent 0605039 commit 0ceace9

8 files changed

Lines changed: 37 additions & 30 deletions

File tree

countbits.vhdl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ architecture behaviour of bit_counter is
5050
begin
5151
countzero_r: process(clk)
5252
begin
53-
if rising_edge(clk) and stall = '0' then
54-
inp_r <= inp;
55-
sum_r <= sum;
53+
if rising_edge(clk) then
54+
if stall = '0' then
55+
inp_r <= inp;
56+
sum_r <= sum;
57+
end if;
5658
end if;
5759
end process;
5860

fetch1.vhdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ begin
152152
attribute ram_style of btc_memory : signal is "block";
153153

154154
signal btc_valids : std_ulogic_vector(BTC_SIZE - 1 downto 0);
155-
attribute ram_style of btc_valids : signal is "distributed";
155+
-- attribute ram_style of btc_valids : signal is "distributed";
156156

157157
signal btc_wr : std_ulogic;
158158
signal btc_wr_data : std_ulogic_vector(BTC_WIDTH - 1 downto 0);

fpga/arty_a7.xdc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ set_property -dict { PACKAGE_PIN R15 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_po
171171
set_property -dict { PACKAGE_PIN P15 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io33 }];
172172
set_property -dict { PACKAGE_PIN R16 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io34 }];
173173
set_property -dict { PACKAGE_PIN N16 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io35 }];
174-
set_property -dict { PACKAGE_PIN N14 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io36 }];
175-
set_property -dict { PACKAGE_PIN U17 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io37 }];
176-
set_property -dict { PACKAGE_PIN T18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io38 }];
177-
set_property -dict { PACKAGE_PIN R18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io39 }];
178-
set_property -dict { PACKAGE_PIN P18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io40 }];
179-
set_property -dict { PACKAGE_PIN N17 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io41 }];
180-
set_property -dict { PACKAGE_PIN M17 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io42 }]; # A
181-
set_property -dict { PACKAGE_PIN L18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io43 }]; # SCL
182-
set_property -dict { PACKAGE_PIN M18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io44 }]; # SDA
174+
#set_property -dict { PACKAGE_PIN N14 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io36 }];
175+
#set_property -dict { PACKAGE_PIN U17 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io37 }];
176+
#set_property -dict { PACKAGE_PIN T18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io38 }];
177+
#set_property -dict { PACKAGE_PIN R18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io39 }];
178+
#set_property -dict { PACKAGE_PIN P18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io40 }];
179+
#set_property -dict { PACKAGE_PIN N17 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io41 }];
180+
#set_property -dict { PACKAGE_PIN M17 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io42 }]; # A
181+
#set_property -dict { PACKAGE_PIN L18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io43 }]; # SCL
182+
#set_property -dict { PACKAGE_PIN M18 IOSTANDARD LVCMOS33 PULLDOWN TRUE } [get_ports { shield_io44 }]; # SDA
183183
#set_property -dict { PACKAGE_PIN C2 IOSTANDARD LVCMOS33 } [get_ports { shield_rst }];
184184

185185
#set_property -dict { PACKAGE_PIN C1 IOSTANDARD LVCMOS33 } [get_ports { spi_hdr_ss }];

fpga/top-arty.vhdl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ architecture behaviour of toplevel is
206206
signal ddram_clk_p_vec : std_logic_vector(0 downto 0);
207207
signal ddram_clk_n_vec : std_logic_vector(0 downto 0);
208208

209+
signal uart1_rxd : std_ulogic;
210+
signal uart1_txd : std_ulogic;
211+
209212
-- Fixup various memory sizes based on generics
210213
function get_bram_size return natural is
211214
begin
@@ -266,8 +269,8 @@ begin
266269
uart0_rxd => uart_main_rx,
267270

268271
-- UART1 signals
269-
--uart1_txd => uart_pmod_tx,
270-
--uart1_rxd => uart_pmod_rx,
272+
uart1_txd => uart1_txd,
273+
uart1_rxd => uart1_rxd,
271274

272275
-- SPI signals
273276
spi_flash_sck => spi_sck,
@@ -302,7 +305,7 @@ begin
302305
wishbone_dma_out => wb_sddma_out
303306
);
304307

305-
--uart_pmod_rts_n <= '0';
308+
uart1_txd <= '1';
306309

307310
-- SPI Flash
308311
--
@@ -415,8 +418,9 @@ begin
415418
);
416419

417420
-- Generate SoC reset
418-
soc_rst_gen: process(system_clk)
421+
soc_rst_gen: process(system_clk, ext_rst_n)
419422
begin
423+
-- XXX why does this need to be an asynchronous reset?
420424
if ext_rst_n = '0' then
421425
soc_rst <= '1';
422426
elsif rising_edge(system_clk) then

icache.vhdl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,12 @@ begin
403403
variable snoop_addr : real_addr_t;
404404
variable next_raddr : real_addr_t;
405405
begin
406-
replace_way := to_unsigned(0, WAY_BITS);
407-
if NUM_WAYS > 1 then
408-
-- Get victim way from plru
409-
replace_way := plru_victim;
410-
end if;
411406
if rising_edge(clk) then
407+
replace_way := to_unsigned(0, WAY_BITS);
408+
if NUM_WAYS > 1 then
409+
-- Get victim way from plru
410+
replace_way := plru_victim;
411+
end if;
412412
-- Read tags using NIA for next cycle
413413
if flush_in = '1' or i_in.req = '0' or (stall_in = '0' and stall_out = '0') then
414414
next_raddr := i_in.next_rpn & i_in.next_nia(MIN_LG_PGSZ - 1 downto 0);
@@ -649,6 +649,7 @@ begin
649649
begin
650650
if rising_edge(clk) then
651651
ev.icache_miss <= '0';
652+
ev.itlb_miss_resolved <= '0';
652653
r.recv_valid <= '0';
653654
-- On reset, clear all valid bits to force misses
654655
if rst = '1' then

microwatt.core

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ filesets:
6262
- fpga/pp_soc_uart.vhd
6363
- fpga/pp_utilities.vhd
6464
- fpga/firmware.hex : {copyto : firmware.hex, file_type : user}
65+
- nonrandom.vhdl
6566
file_type : vhdlSource-2008
6667

6768
xilinx_specific:
6869
files:
6970
- xilinx-mult.vhdl : {file_type : vhdlSource-2008}
7071
- xilinx-mult-32s.vhdl : {file_type : vhdlSource-2008}
71-
- fpga/fpga-random.vhdl : {file_type : vhdlSource-2008}
72-
- fpga/fpga-random.xdc : {file_type : xdc}
7372

7473
debug_xilinx:
7574
files:

xics.vhdl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,14 @@ begin
386386
reg_write: process(clk)
387387
variable be_in : std_ulogic_vector(31 downto 0);
388388
begin
389-
-- Byteswapped input
390-
be_in := bswap(wb_in.dat);
391-
392389
if rising_edge(clk) then
393390
if rst = '1' then
394391
for i in 0 to SRC_NUM - 1 loop
395392
xives(i) <= (pri => pri_masked);
396393
end loop;
397394
elsif wb_valid = '1' and wb_in.we = '1' then
395+
-- Byteswapped input
396+
be_in := bswap(wb_in.dat);
398397
if reg_is_xive then
399398
-- TODO: When adding support for other bits, make sure to
400399
-- properly implement wb_in.sel to allow partial writes.

xilinx-mult-32s.vhdl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,11 @@ begin
286286

287287
process(clk)
288288
begin
289-
if rising_edge(clk) and stall = '0' then
290-
m_out.valid <= m_in.valid;
291-
product_lo <= m01_p(5 downto 0) & m00_p(16 downto 0);
289+
if rising_edge(clk) then
290+
if stall = '0' then
291+
m_out.valid <= m_in.valid;
292+
product_lo <= m01_p(5 downto 0) & m00_p(16 downto 0);
293+
end if;
292294
end if;
293295
end process;
294296

0 commit comments

Comments
 (0)