diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-05-26 03:07:51 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-05-27 14:32:51 +0200 |
commit | b019db1f373e6bfe2b55363d28b9b6828a1cca6c (patch) | |
tree | b6dbbd72a6691c384b71e17d721aa98163fbfd66 /kernel/mem.h | |
parent | 83a218141c1a333b582c257c316ddea63e1ca519 (diff) | |
download | yosys-b019db1f373e6bfe2b55363d28b9b6828a1cca6c.tar.gz yosys-b019db1f373e6bfe2b55363d28b9b6828a1cca6c.tar.bz2 yosys-b019db1f373e6bfe2b55363d28b9b6828a1cca6c.zip |
kernel/mem: Add helpers for write port widening.
Diffstat (limited to 'kernel/mem.h')
-rw-r--r-- | kernel/mem.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/mem.h b/kernel/mem.h index 82eb0f488..b4a9cb695 100644 --- a/kernel/mem.h +++ b/kernel/mem.h @@ -109,6 +109,17 @@ struct Mem { // is called. void prepare_wr_merge(int idx1, int idx2); + // Prepares the memory for widening a port to a given width. This + // involves ensuring that start_offset and size are aligned to the + // target width. + void widen_prep(int wide_log2); + + // Widens a write port up to a given width. The newly port is + // equivalent to the original, made by replicating enable/data bits + // and masking enable bits with decoders on the low part of the + // original address. + void widen_wr_port(int idx, int wide_log2); + Mem(Module *module, IdString memid, int width, int start_offset, int size) : module(module), memid(memid), packed(false), mem(nullptr), cell(nullptr), width(width), start_offset(start_offset), size(size) {} }; |