diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-09-27 22:30:41 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-09-27 22:30:41 +0300 |
| commit | f4afcfa58eb90d14abd55d79640ecda13b23dc21 (patch) | |
| tree | c0f63b35502d74cbdf3d2bc881675859a235596d /src/common.svh | |
| parent | bc5941a1fcfd0a607a6aef51f7659c3f233b65dc (diff) | |
| download | ttarv32-f4afcfa58eb90d14abd55d79640ecda13b23dc21.tar.gz ttarv32-f4afcfa58eb90d14abd55d79640ecda13b23dc21.zip | |
+ Not great latency, but has a fairly high fmax and low resource usage
on my FPGA, so go with this for now. Likely better suited for data
path, unsure what I'll do for the control path.
Diffstat (limited to 'src/common.svh')
| -rw-r--r-- | src/common.svh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common.svh b/src/common.svh index 67a87d2..131a2ca 100644 --- a/src/common.svh +++ b/src/common.svh @@ -116,4 +116,6 @@ typedef enum op_t { `define rn(r) (REG + port_t'(r)) `define alu(fu) (ALU + port_t'(fu)) +`define COUNTER(x) ((x) > 1 ? $clog2(x) : 1) + `endif /* __COMMON_SVH__ */ |
