Skip to content

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

Notifications You must be signed in to change notification settings

chiggs/hidden_wires

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published