P4C
The P4 Compiler
Loading...
Searching...
No Matches
tofino/instruction_memory.h
1
19#ifndef BF_P4C_MAU_TOFINO_INSTRUCTION_MEMORY_H_
20#define BF_P4C_MAU_TOFINO_INSTRUCTION_MEMORY_H_
21
22#include "backends/tofino/bf-p4c/mau/instruction_memory.h"
23
24namespace Tofino {
25
27 static constexpr int IMEM_ROWS = 32;
28 static constexpr int IMEM_COLORS = 2;
29
32
35
36 BFN::Alloc2Dbase<cstring> &imem_use(gress_t gress) {
37 if (gress == INGRESS || gress == GHOST) return ingress_imem_use;
38 return egress_imem_use;
39 }
40
41 BFN::Alloc2Dbase<bitvec> &imem_slot_inuse(gress_t gress) {
42 if (gress == INGRESS || gress == GHOST) return ingress_imem_slot_inuse;
43 return egress_imem_slot_inuse;
44 }
45
46 InstructionMemory() : ::InstructionMemory(Device::imemSpec()) {}
47};
48
49} // end namespace Tofino
50
51#endif /* BF_P4C_MAU_TOFINO_INSTRUCTION_MEMORY_H_ */
Definition alloc.h:152
Definition alloc.h:76
Definition tofino/action_data_bus.cpp:28
Definition instruction_memory.h:82
Definition tofino/instruction_memory.h:26