Code Monkey home page Code Monkey logo

cjtag_bridge's Introduction

🔌 Compact-JTAG to 4-Wire JTAG Bridge

license

This bridge implements a simple converter to connect compact JTAG (cJTAG) probes to IEEE 1149.1 4-wire JTAG device. cJTAG only uses two wires: a uni-directional clock generated by the probe (TCKC) and a bi-directional data signal (TMSC).

ℹ️ This bridge only supports the OScan1 cJTAG format yet.

⚠️ This project is still work-in-progress.

Top Entity

The top entity is rtl/cjtag_bridge.vhd:

entity cjtag_bridge is
  port (
    -- global control --
    clk_i     : in  std_ulogic; -- main clock
    rstn_i    : in  std_ulogic; -- main reset, async, low-active
    -- cJTAG (from debug probe) --
    tckc_i    : in  std_ulogic; -- tap clock
    tmsc_i    : in  std_ulogic; -- tap data input
    tmsc_o    : out std_ulogic; -- tap data output
    tmsc_oe_o : out std_ulogic; -- tap data output enable (tri-state driver)
    -- JTAG (to device) --
    tck_o     : out std_ulogic; -- tap clock
    tdi_o     : out std_ulogic; -- tap data input
    tdo_i     : in  std_ulogic; -- tap data output
    tms_o     : out std_ulogic  -- tap mode select
  );
end cjtag_bridge;

ℹ️ The cJTAG clock frequency (TCKC signal) must not exceed 1/5 of the main clock (clk_i signal) frequency.

ℹ️ All 4-wire JTAG signals are expected to be sync to clk_i (same clock domain).

ℹ️ The debug signals db_* are intended for testing/development only.

Hardware Requirements

The bridge requires a module-external tri-state driver for the off-chip TMSC signal (tmsc), which handles the module's tmsc_i, tmsc_o and tmsc_oe_o signals:

-- TMSC tri-state driver --
tmsc   <= tmsc_o when (tmsc_oe_o = '1') else 'Z';
tmsc_i <= tmsc;

⚠️ Better add a "panic resistor" into the bi-directional TMSC line - just to be safe.

Simulation

The projects provides a very simple testbench to test the basic IO functions (sim/cjtag_bridge_tb.vhd). It can be simulated by GHDL via the provided script:

cjtag_bridge/sim$ sh ghdl.sh

The simulation will run for 1ms using a 100MHz clock. The waveform data is stored to sim/cjtag_bridge.ghw so it can be viewed using gtkwave:

cjtag_bridge/sim$ gtkwave cjtag_bridge.ghw

A pre-defined waveform configuration file is also provided: sim/wave_config.gtkw

Hardware Utilization

🚧 TODO 🚧

Resources

cjtag_bridge's People

Contributors

stnolting avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.