1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-11 23:43:15 +00:00
antonblanchard.microwatt/sim-unisim/unisim_vcomponents.vhdl
Benjamin Herrenschmidt ee52fd4d80 Add a debug (DMI) bus and a JTAG interface to it on Xilinx FPGAs
This adds a simple bus that can be mastered from an external
system via JTAG, which will be used to hookup various debug
modules.

It's loosely based on the RiscV model (hence the DMI name).

The module currently only supports hooking up to a Xilinx BSCANE2
but it shouldn't be too hard to adapt it to support different TAPs
if necessary.

The JTAG protocol proper is not exactly the RiscV one at this point,
though I might still change it.

This comes with some sim variants of Xilinx BSCANE2 and BUFG and a
test bench.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2019-09-20 15:07:49 +10:00

46 lines
1.1 KiB
VHDL

library IEEE;
use IEEE.std_logic_1164.all;
package vcomponents is
-- Global JTAG signals. Xilinx implementation hooks that up to
-- their internal JTAG tap, we just expose them for the testbench
-- to use. These are used by our BSCANE2 block.
--
type glob_jtag_t is record
reset : std_logic;
tck : std_logic;
tdo : std_logic;
tdi : std_logic;
tms : std_logic;
sel : std_logic_vector(4 downto 1);
capture : std_logic;
shift : std_logic;
update : std_logic;
runtest : std_logic;
end record glob_jtag_t;
signal glob_jtag : glob_jtag_t;
component BSCANE2 is
generic(jtag_chain: integer);
port(capture : out std_logic;
drck : out std_logic;
reset : out std_logic;
runtest : out std_logic;
sel : out std_logic;
shift : out std_logic;
tck : out std_logic;
tdi : out std_logic;
tms : out std_logic;
update : out std_logic;
tdo : in std_logic
);
end component BSCANE2;
component BUFG is
port(I : in std_logic;
O : out std_logic
);
end component BUFG;
end package vcomponents;