Merge pull request #317 from antonblanchard/gpio-fix

gpio: Add HAS_GPIO to avoid verilator build errors
dcache-nc-fix
Paul Mackerras 3 years ago committed by GitHub
commit 71af8016da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,6 +28,7 @@ entity toplevel is
UART_IS_16550 : boolean := false; UART_IS_16550 : boolean := false;
HAS_UART1 : boolean := true; HAS_UART1 : boolean := true;
USE_LITESDCARD : boolean := false; USE_LITESDCARD : boolean := false;
HAS_GPIO : boolean := true;
NGPIO : natural := 32 NGPIO : natural := 32
); );
port( port(
@ -207,6 +208,7 @@ begin
UART0_IS_16550 => UART_IS_16550, UART0_IS_16550 => UART_IS_16550,
HAS_UART1 => HAS_UART1, HAS_UART1 => HAS_UART1,
HAS_SD_CARD => USE_LITESDCARD, HAS_SD_CARD => USE_LITESDCARD,
HAS_GPIO => HAS_GPIO,
NGPIO => NGPIO NGPIO => NGPIO
) )
port map ( port map (

@ -81,7 +81,8 @@ entity soc is
DCACHE_TLB_SET_SIZE : natural := 64; DCACHE_TLB_SET_SIZE : natural := 64;
DCACHE_TLB_NUM_WAYS : natural := 2; DCACHE_TLB_NUM_WAYS : natural := 2;
HAS_SD_CARD : boolean := false; HAS_SD_CARD : boolean := false;
NGPIO : natural := 0 HAS_GPIO : boolean := false;
NGPIO : natural := 32
); );
port( port(
rst : in std_ulogic; rst : in std_ulogic;
@ -913,20 +914,22 @@ begin
icp_out => ics_to_icp icp_out => ics_to_icp
); );


gpio : entity work.gpio gpio0_gen: if HAS_GPIO generate
generic map( gpio : entity work.gpio
NGPIO => NGPIO generic map(
) NGPIO => NGPIO
port map( )
clk => system_clk, port map(
rst => rst_gpio, clk => system_clk,
wb_in => wb_gpio_in, rst => rst_gpio,
wb_out => wb_gpio_out, wb_in => wb_gpio_in,
gpio_in => gpio_in, wb_out => wb_gpio_out,
gpio_out => gpio_out, gpio_in => gpio_in,
gpio_dir => gpio_dir, gpio_out => gpio_out,
intr => gpio_intr gpio_dir => gpio_dir,
); intr => gpio_intr
);
end generate;


-- Assign external interrupts -- Assign external interrupts
interrupts: process(all) interrupts: process(all)

Loading…
Cancel
Save