From d31320a501cc8ce4c019fb5296a708c1c1d6a3d6 Mon Sep 17 00:00:00 2001 From: stnolting <22944758+stnolting@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:45:47 +0100 Subject: [PATCH] [top] add GPTMR capture input --- rtl/core/neorv32_package.vhd | 8 +++++--- rtl/core/neorv32_top.vhd | 8 ++++++-- sim/neorv32_tb.vhd | 4 +++- sim/simple/neorv32_tb.simple.vhd | 4 +++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/rtl/core/neorv32_package.vhd b/rtl/core/neorv32_package.vhd index 9df1f576d..c24c28cbe 100644 --- a/rtl/core/neorv32_package.vhd +++ b/rtl/core/neorv32_package.vhd @@ -3,7 +3,7 @@ -- # ********************************************************************************************* # -- # BSD 3-Clause License # -- # # --- # Copyright (c) 2023, Stephan Nolting. All rights reserved. # +-- # Copyright (c) 2024, Stephan Nolting. All rights reserved. # -- # # -- # Redistribution and use in source and binary forms, with or without modification, are # -- # permitted provided that the following conditions are met: # @@ -56,7 +56,7 @@ package neorv32_package is -- Architecture Constants ----------------------------------------------------------------- -- ------------------------------------------------------------------------------------------- - constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01090207"; -- hardware version + constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01090208"; -- hardware version constant archid_c : natural := 19; -- official RISC-V architecture ID constant XLEN : natural := 32; -- native data path width @@ -865,7 +865,7 @@ package neorv32_package is -- Advanced memory control signals -- fence_o : out std_ulogic; fencei_o : out std_ulogic; - -- XIP (execute in place via SPI) signals (available if IO_XIP_EN = true) -- + -- XIP (execute in-place via SPI) signals (available if IO_XIP_EN = true) -- xip_csn_o : out std_ulogic; xip_clk_o : out std_ulogic; xip_dat_i : in std_ulogic := 'L'; @@ -908,6 +908,8 @@ package neorv32_package is cfs_out_o : out std_ulogic_vector(IO_CFS_OUT_SIZE-1 downto 0); -- NeoPixel-compatible smart LED interface (available if IO_NEOLED_EN = true) -- neoled_o : out std_ulogic; + -- GPTMR timer capture (available if IO_GPTMR_EN = true) -- + gptmr_trig_i : in std_ulogic := 'L'; -- External platform interrupts (available if XIRQ_NUM_CH > 0) -- xirq_i : in std_ulogic_vector(31 downto 0) := (others => 'L'); -- CPU Interrupts -- diff --git a/rtl/core/neorv32_top.vhd b/rtl/core/neorv32_top.vhd index 0bafc528c..c5f26c187 100644 --- a/rtl/core/neorv32_top.vhd +++ b/rtl/core/neorv32_top.vhd @@ -8,7 +8,7 @@ -- # ********************************************************************************************* # -- # BSD 3-Clause License # -- # # --- # Copyright (c) 2023, Stephan Nolting. All rights reserved. # +-- # Copyright (c) 2024, Stephan Nolting. All rights reserved. # -- # # -- # Redistribution and use in source and binary forms, with or without modification, are # -- # permitted provided that the following conditions are met: # @@ -241,6 +241,9 @@ entity neorv32_top is -- NeoPixel-compatible smart LED interface (available if IO_NEOLED_EN = true) -- neoled_o : out std_ulogic; -- async serial data line + -- GPTMR timer capture (available if IO_GPTMR_EN = true) -- + gptmr_trig_i : in std_ulogic := 'L'; -- capture trigger + -- External platform interrupts (available if XIRQ_NUM_CH > 0) -- xirq_i : in std_ulogic_vector(31 downto 0) := (others => 'L'); -- IRQ channels @@ -1375,7 +1378,8 @@ begin bus_rsp_o => iodev_rsp(IODEV_GPTMR), clkgen_en_o => cg_en.gptmr, clkgen_i => clk_gen, - irq_o => firq.gptmr + irq_o => firq.gptmr, + capture_i => gptmr_trig_i ); end generate; diff --git a/sim/neorv32_tb.vhd b/sim/neorv32_tb.vhd index 1df10ddcb..7d66650e2 100644 --- a/sim/neorv32_tb.vhd +++ b/sim/neorv32_tb.vhd @@ -7,7 +7,7 @@ -- # ********************************************************************************************* # -- # BSD 3-Clause License # -- # # --- # Copyright (c) 2023, Stephan Nolting. All rights reserved. # +-- # Copyright (c) 2024, Stephan Nolting. All rights reserved. # -- # # -- # Redistribution and use in source and binary forms, with or without modification, are # -- # permitted provided that the following conditions are met: # @@ -377,6 +377,8 @@ begin cfs_out_o => open, -- custom CFS outputs -- NeoPixel-compatible smart LED interface (available if IO_NEOLED_EN = true) -- neoled_o => open, -- async serial data line + -- GPTMR timer capture (available if IO_GPTMR_EN = true) -- + gptmr_trig_i => gpio(63), -- capture trigger -- External platform interrupts (available if XIRQ_NUM_CH > 0) -- xirq_i => gpio(31 downto 0), -- IRQ channels -- CPU Interrupts -- diff --git a/sim/simple/neorv32_tb.simple.vhd b/sim/simple/neorv32_tb.simple.vhd index 2779e1885..d8513278c 100644 --- a/sim/simple/neorv32_tb.simple.vhd +++ b/sim/simple/neorv32_tb.simple.vhd @@ -7,7 +7,7 @@ -- # ********************************************************************************************* # -- # BSD 3-Clause License # -- # # --- # Copyright (c) 2023, Stephan Nolting. All rights reserved. # +-- # Copyright (c) 2024, Stephan Nolting. All rights reserved. # -- # # -- # Redistribution and use in source and binary forms, with or without modification, are # -- # permitted provided that the following conditions are met: # @@ -325,6 +325,8 @@ begin cfs_out_o => open, -- custom CFS outputs -- NeoPixel-compatible smart LED interface (available if IO_NEOLED_EN = true) -- neoled_o => open, -- async serial data line + -- GPTMR timer capture (available if IO_GPTMR_EN = true) -- + gptmr_trig_i => gpio(63), -- capture trigger -- External platform interrupts (available if XIRQ_NUM_CH > 0) -- xirq_i => gpio(31 downto 0), -- IRQ channels -- CPU Interrupts --