-
Notifications
You must be signed in to change notification settings - Fork 15
[P1] Code generation #6
Copy link
Copy link
Labels
new featureNew feature or requestNew feature or request
Description
We need a code generator:
- based on the neura operations, generate CGRA instructions. The generated instructions could be in format of:
- Some confusions on VectorCGRA's specification Jackcuii/EasyCGRA#1 (comment)
- this format can be simulated through a CGRA simulator.
- and eventually be parsed/translated into sth like this:
- Some confusions on VectorCGRA's specification Jackcuii/EasyCGRA#1 (comment)
IntraCgraPktType(0, 6, payload = CgraPayloadType(CMD_CONST, data = DataType(0, 1))),
IntraCgraPktType(0, 6, payload = CgraPayloadType(CMD_CONST, data = DataType(1, 1))),
# Pre-configure per-tile config count per iter.
IntraCgraPktType(0, 6, payload = CgraPayloadType(CMD_CONFIG_COUNT_PER_ITER, data = DataType(1, 1))),
# Pre-configure per-tile total config count.
IntraCgraPktType(0, 6, payload = CgraPayloadType(CMD_CONFIG_TOTAL_CTRL_COUNT, data = DataType(updated_ctrl_steps, 1))),
# LD_CONST indicates the address is a const.
IntraCgraPktType(0, 6,
payload = CgraPayloadType(CMD_CONFIG, ctrl_addr = 0,
ctrl = CtrlType(OPT_LD_CONST, 0,
fu_in_code,
[TileInType(0), TileInType(0), TileInType(0), TileInType(0),
TileInType(0), TileInType(0), TileInType(0), TileInType(0)],
# Sends to east tiles: [tile 7, tile 8].
[FuOutType(0), FuOutType(0), FuOutType(0), FuOutType(1),
FuOutType(0), FuOutType(0), FuOutType(0), FuOutType(0)]))),
IntraCgraPktType(0, 6, payload = CgraPayloadType(CMD_LAUNCH))
],
Reactions are currently unavailable