improved error message
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -2,6 +2,7 @@ | |||||||
| #import "@preview/cetz:0.3.4": draw | #import "@preview/cetz:0.3.4": draw | ||||||
|  |  | ||||||
| #set text(font: "Source Sans 3") | #set text(font: "Source Sans 3") | ||||||
|  | #set page(width: auto, height: auto, margin: .5cm) | ||||||
|  |  | ||||||
| #circuit({ | #circuit({ | ||||||
|   element.block( |   element.block( | ||||||
| @@ -184,7 +185,6 @@ | |||||||
|   ) |   ) | ||||||
|   wire.stub("ALU.north", side: "north") |   wire.stub("ALU.north", side: "north") | ||||||
|  |  | ||||||
|   /* |  | ||||||
|   element.block( |   element.block( | ||||||
|     pos: ( |     pos: ( | ||||||
|       26, (align: "in", with: "ALU.out") |       26, (align: "in", with: "ALU.out") | ||||||
| @@ -202,7 +202,7 @@ | |||||||
|   wire.wire( |   wire.wire( | ||||||
|     "ALU.out", |     "ALU.out", | ||||||
|     "OutBuf.in", |     "OutBuf.in", | ||||||
|     id: "wALU-OutBuf" |     id: "wALU-OutBuf", | ||||||
|     name: "ALUResult", |     name: "ALUResult", | ||||||
|     bus: true |     bus: true | ||||||
|   ) |   ) | ||||||
| @@ -216,12 +216,12 @@ | |||||||
|     fill: util.colors.orange, |     fill: util.colors.orange, | ||||||
|     entries: 3 |     entries: 3 | ||||||
|   ) |   ) | ||||||
|   wire.stub("Res-MP.north", name: "ResultSrc") |   wire.stub("Res-MP.north", side: "north", name: "ResultSrc") | ||||||
|   wire.stub("Res-MP.in2") |   wire.stub("Res-MP.in2") | ||||||
|   wire.wire( |   wire.wire( | ||||||
|     "OutBuf.out", |     "OutBuf.out", | ||||||
|     "Res-MP.in0", |     "Res-MP.in0", | ||||||
|     id: "wOutBuf-ResMP" |     id: "wOutBuf-ResMP", | ||||||
|     name: "ALUOut", |     name: "ALUOut", | ||||||
|     bus: true |     bus: true | ||||||
|   ) |   ) | ||||||
| @@ -229,7 +229,7 @@ | |||||||
|   wire.wire( |   wire.wire( | ||||||
|     "Extender.out", |     "Extender.out", | ||||||
|     "ALU.in2", |     "ALU.in2", | ||||||
|     id: "wExt-ALU" |     id: "wExt-ALU", | ||||||
|     name: ("ImmExt", "SrcB"), |     name: ("ImmExt", "SrcB"), | ||||||
|     bus: true, |     bus: true, | ||||||
|     style: "zigzag", |     style: "zigzag", | ||||||
| @@ -239,7 +239,7 @@ | |||||||
|   wire.wire( |   wire.wire( | ||||||
|     "InstDataMgr.RD", |     "InstDataMgr.RD", | ||||||
|     "Res-MP.in1", |     "Res-MP.in1", | ||||||
|     id: "wInstDataMgr-ResMP" |     id: "wInstDataMgr-ResMP", | ||||||
|     style: "dodge", |     style: "dodge", | ||||||
|     dodge-y: -4, |     dodge-y: -4, | ||||||
|     dodge-sides: ("east", "west"), |     dodge-sides: ("east", "west"), | ||||||
| @@ -250,7 +250,7 @@ | |||||||
|   wire.wire( |   wire.wire( | ||||||
|     "Res-MP.out", |     "Res-MP.out", | ||||||
|     "AdrSrc-MP.in1", |     "AdrSrc-MP.in1", | ||||||
|     id: "wResMP-AdrSrc" |     id: "wResMP-AdrSrc", | ||||||
|     style: "dodge", |     style: "dodge", | ||||||
|     dodge-y: -5, |     dodge-y: -5, | ||||||
|     dodge-sides: ("east", "west"), |     dodge-sides: ("east", "west"), | ||||||
| @@ -261,7 +261,7 @@ | |||||||
|   wire.wire( |   wire.wire( | ||||||
|     "Res-MP.out", |     "Res-MP.out", | ||||||
|     "RegFile.WD3", |     "RegFile.WD3", | ||||||
|     id: "wResMP-RegFile" |     id: "wResMP-RegFile", | ||||||
|     style: "dodge", |     style: "dodge", | ||||||
|     dodge-y: -5, |     dodge-y: -5, | ||||||
|     dodge-sides: ("east", "west"), |     dodge-sides: ("east", "west"), | ||||||
| @@ -272,7 +272,7 @@ | |||||||
|   wire.wire( |   wire.wire( | ||||||
|     "Res-MP.out", |     "Res-MP.out", | ||||||
|     "PCBuf.PCNext", |     "PCBuf.PCNext", | ||||||
|     id: "wResMP-PCBuf" |     id: "wResMP-PCBuf", | ||||||
|     style: "dodge", |     style: "dodge", | ||||||
|     dodge-y: -5, |     dodge-y: -5, | ||||||
|     dodge-sides: ("east", "west"), |     dodge-sides: ("east", "west"), | ||||||
| @@ -283,5 +283,4 @@ | |||||||
|  |  | ||||||
|   wire.intersection("wResMP-RegFile.dodge-end", radius: .2) |   wire.intersection("wResMP-RegFile.dodge-end", radius: .2) | ||||||
|   wire.intersection("wResMP-AdrSrc.dodge-end", radius: .2) |   wire.intersection("wResMP-AdrSrc.dodge-end", radius: .2) | ||||||
|   */ |  | ||||||
| }) | }) | ||||||
| @@ -9,7 +9,9 @@ | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   panic("Unknown port " + port + " on element " + elmt.id) |   panic( | ||||||
|  |     "Unknown port '" + port + "' on element '" + elmt.id + "', could not automatically determine side" | ||||||
|  |   ) | ||||||
| } | } | ||||||
|  |  | ||||||
| #let get-port-idx(elmt, port, side: auto) = { | #let get-port-idx(elmt, port, side: auto) = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user