chiggs / hidden_wires

Proof-of-concept: Use static variables inside SystemVerilog functions to communicate between modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hidden Wires

Description

SystemVerilog proof-of-concept for using static variables inside functions to communicate between modules.

This allows connections to be made without having to add wiring through the hierarchy. Possible applications include pulling signals out to logic analyser, writing to global resources (event log, statistics, UART etc.)

This project compiles and does the "right thing" in Quartus. Unfortunately Xilinx do not yet support static functions (see this thread for further detail).

Diagram

       +-------------------------------------------+
       |  top                                      |
       +-------------------------------------------+
       |                                           |
       |     +---------+           +---------+     |
       |     | module1 |           | module2 |     |
       |     |---------|           |---------|     |
       |     |         |           |         |     |
     +------->         |           |         +------->
     +------->         |           |         +------->
     +------->         |           |         +------->
       |     |         |           |         |     |
       |  +----(set=1) |           | (set=0)----+  |
       |  |  |         |           |         |  |  |
       |  |  +---------+           +---------+  |  |
       |  |                                     |  |
       |  |                                     |  |
       |  |                                     |  |
       |  |    +---------------------------+    |  |
       |  |    | hidden_wires_pkg::connect |    |  |
       |  |    |---------------------------|    |  |
       |  |    | static variable           |    |  |
       |  +--->|                           |<---+  |
       |       |                           |       |
       |       +---------------------------+       |
       |                                           |
       +-------------------------------------------+

About

Proof-of-concept: Use static variables inside SystemVerilog functions to communicate between modules


Languages

Language:Tcl 65.7%Language:SystemVerilog 34.3%