OR-1 dataflow CPU sketch
at main 67 lines 1.2 kB view raw
1export type GraphNode = { 2 id: string; 3 opcode: string; 4 category: string; 5 colour: string; 6 const: number | null; 7 pe: number | null; 8 iram_offset: number | null; 9 ctx: number | null; 10 has_error: boolean; 11 loc: SourceLoc; 12 sm_id?: number | null; 13 synthetic?: boolean; 14 label?: string; 15}; 16 17export type SourceLoc = { 18 line: number; 19 column: number; 20 end_line: number | null; 21 end_column: number | null; 22}; 23 24export type AddrInfo = { 25 offset: number; 26 port: string; 27 pe: number | null; 28}; 29 30export type GraphEdge = { 31 source: string; 32 target: string; 33 port: string; 34 source_port: string | null; 35 has_error: boolean; 36 addr?: AddrInfo; 37 synthetic?: boolean; 38}; 39 40export type GraphRegion = { 41 tag: string; 42 kind: string; 43 node_ids: string[]; 44}; 45 46export type GraphError = { 47 line: number; 48 column: number; 49 category: string; 50 message: string; 51 suggestions: string[]; 52}; 53 54export type GraphUpdate = { 55 type: "graph_update"; 56 stage: string; 57 nodes: GraphNode[]; 58 edges: GraphEdge[]; 59 regions: GraphRegion[]; 60 errors: GraphError[]; 61 parse_error: string | null; 62 metadata: { 63 stage: string; 64 pe_count: number; 65 sm_count: number; 66 }; 67};