PipelineC icon indicating copy to clipboard operation
PipelineC copied to clipboard

Make clock crossing 'types' more clear in 'declaration'

Open JulianKemmerer opened this issue 2 years ago • 2 comments

Currently clock crossings are declared like so https://github.com/JulianKemmerer/PipelineC/wiki/Main-Function-Clock-Crossings

Now that https://github.com/JulianKemmerer/PipelineC/issues/73 was completed, its less of an issue for weirdest old clock_crossing/the_wire.h style ...

// Volatile buffered
volatile type_t the_buffered_crossing;
#include "clock_crossing/the_buffered_crossing.h"

// Non volatile fifo
type_t the_fifo[DEPTH];
#include "clock_crossing/the_fifo.h"

Consider clock_crossing_buffer, clock_crossing_fifo? Can likely do better checks of usage with this extra info...

Ex.

// Volatile buffered
volatile type_t the_buffered_crossing;
#include "clock_crossing_buffer/the_buffered_crossing.h"

// Non volatile fifo
type_t the_fifo[DEPTH];
#include "clock_crossing_fifo/the_fifo.h"

Also can convert ASYNC_WIRE pragma from #68 into a async_wire other option?

JulianKemmerer avatar Mar 25 '22 03:03 JulianKemmerer

Could use these names names to easily extend some future 'global_bus' concept

JulianKemmerer avatar Mar 26 '22 18:03 JulianKemmerer

Writes to shared globals are going to default behave like WIREs soon per https://github.com/JulianKemmerer/PipelineC/issues/73 Did rename the clk cross bus the global bus - which can carry signals that clock cross - but not all do.

JulianKemmerer avatar Jun 25 '22 02:06 JulianKemmerer