mirror of
https://github.com/soconnor0919/nand2tetris-zed.git
synced 2025-12-12 23:24:45 -05:00
- Fixed HDL highlights query syntax error with #match? predicate - Replaced #match? with #any-of? for exact string matching - Fixed Hack Assembly outline query invalid field name - Improved HDL syntax highlighting with comprehensive patterns - Added HDL bracket matching for all syntax types - Fixed XML scope mismatch from text.xml to source.xml - Enhanced outline queries for better code navigation
30 lines
768 B
Plaintext
30 lines
768 B
Plaintext
// Test HDL file for syntax highlighting
|
|
/**
|
|
* Example chip demonstrating various HDL syntax patterns
|
|
*/
|
|
CHIP TestChip {
|
|
IN in[16], // 16-bit input
|
|
load, // control signal
|
|
address[3]; // 3-bit address
|
|
|
|
OUT out[16], // 16-bit output
|
|
ready; // status signal
|
|
|
|
PARTS:
|
|
// Built-in chip reference
|
|
BUILTIN ALU;
|
|
|
|
// Clocked body
|
|
CLOCKED DFF, Register;
|
|
|
|
// Part instantiation with connections
|
|
Mux16(a=in, b=out, sel=load, out=muxOut);
|
|
|
|
// Register with bus connections
|
|
Register(in=muxOut, load=load, out=out);
|
|
|
|
// Complex connection
|
|
ALU(x=in, y=out, zx=load, nx=false, zy=true, ny=false,
|
|
f=true, no=false, out=aluOut, zr=zero, ng=negative);
|
|
}
|