MCPcopy
hub / github.com/bbycroft/llm-viz / getPort

Method getPort

src/cpu/comps/CompBuilder.tsx:249–256  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

247 }
248
249 public getPort(id: string): IExePort {
250 let portIdx = this.portNameToIdx.get(id);
251 if (isNil(portIdx)) {
252 let validPortsMsg = 'Valid ports are [' + Array.from(this.portNameToIdx.keys()).join(', ') + ']';
253 throw new Error(`Port ${id} not found on component ${this.comp.name} (${this.comp.id}). ` + validPortsMsg);
254 }
255 return this.ports[portIdx];
256 }
257
258 public createExternalPort(id: string, type: PortType, width: number): IExePort {
259 let portIdx = this.ports.length;

Callers 12

createCompIoCompsFunction · 0.80
createBinaryGateCompsFunction · 0.80
createInputOutputCompsFunction · 0.80
createRiscvExtraCompsFunction · 0.80
createRegisterCompsFunction · 0.80
createSimpleMemoryCompsFunction · 0.80
createAluCompsFunction · 0.80
createMuxCompsFunction · 0.80
createAddressingCompsFunction · 0.80
createLedOutputCompsFunction · 0.80
createRegFileCtrlCompsFunction · 0.80

Calls 1

isNilFunction · 0.90

Tested by

no test coverage detected