Skip to content

🔌 Compact JTAG ("cJTAG") to 4-wire JTAG (IEEE 1149.1) bridge.

License

Notifications You must be signed in to change notification settings

kuopinghsu/cjtag_bridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔌 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.

Origianl VHDL code from cjtag_bridge, convert it to Verilog file, and using Verilator for simulation.

Top Entity

The top entity is rtl/cjtag_bridge.v:

module cjtag_bridge (
    // global control
    input       clk_i,       // main clock
    input       rstn_i,      // main reset, async, low-active

    // cJTAG (from debug probe)
    input       tckc_i,      // tap clock
    input       tmsc_i,      // tap data input
    output      tmsc_o,      // tap data output
    output      tmsc_oe_o,   // tap data output enable (tri-state driver)

    // JTAG (to device)
    output      tck_o,       // tap clock
    output      tdi_o,       // tap data input
    input       tdo_i,       // tap data input
    output      tms_o,       // tap mode select

    // Debugging (for testing only)
    output      db_tck_rising_o,
    output      db_tck_falling_o
);

ℹ️ 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:

⚠️ 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.v). It can be simulated by Verilator via the Makefile

cjtag_bridge/sim$ make

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

cjtag_bridge/sim$ gtkwave wave.fst

Hardware Utilization

🚧 TODO 🚧

Resources

About

🔌 Compact JTAG ("cJTAG") to 4-wire JTAG (IEEE 1149.1) bridge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Verilog 94.0%
  • C++ 4.2%
  • Makefile 1.8%