From 1f827c176f8ad06d916894f17ceedca7bb92330f Mon Sep 17 00:00:00 2001 From: Guojie Luo Date: Tue, 15 Feb 2022 21:57:53 +0800 Subject: [PATCH] Add ModuleContext --- src/cst/context.rs | 27 +- src/cst/mod.rs | 2 +- src/cst/module_declaration.rs | 10 +- test/counter-cst.json | 1242 ++++++++++++++++++++++++++++++- test/counter-cst.json.orig | 1289 --------------------------------- 5 files changed, 1275 insertions(+), 1295 deletions(-) delete mode 100644 test/counter-cst.json.orig diff --git a/src/cst/context.rs b/src/cst/context.rs index 368253e..7ddbbad 100644 --- a/src/cst/context.rs +++ b/src/cst/context.rs @@ -1,7 +1,28 @@ -pub struct Context {} +use llhd::ir::Arg; +use std::collections::HashMap; -impl Context { +pub struct ModuleContext { + pub arg_info: HashMap, +} + +pub struct ArgInfo { + pub name: String, + pub width: usize, +} + +impl ModuleContext { pub fn new() -> Self { - Self {} + Self { + arg_info: HashMap::new(), + } + } +} + +impl ArgInfo { + pub fn new(name: &String, width: &usize) -> Self { + Self { + name: name.to_string(), + width: width.clone(), + } } } diff --git a/src/cst/mod.rs b/src/cst/mod.rs index bed7be6..df5260f 100644 --- a/src/cst/mod.rs +++ b/src/cst/mod.rs @@ -4,7 +4,7 @@ pub mod module_declaration; pub mod tags; pub mod tools; -pub use context::Context; +pub use context::{ArgInfo, ModuleContext}; pub use description_list::DescriptionList; pub use module_declaration::ModuleDeclaration; pub use tags::Tag; diff --git a/src/cst/module_declaration.rs b/src/cst/module_declaration.rs index cd18171..2f77aa5 100644 --- a/src/cst/module_declaration.rs +++ b/src/cst/module_declaration.rs @@ -1,4 +1,4 @@ -use crate::cst::{Tag, Tools}; +use crate::cst::{ArgInfo, ModuleContext, Tag, Tools}; use json::JsonValue; use llhd::ir::{InstBuilder, Module, Signature, UnitBuilder, UnitData, UnitKind, UnitName}; use llhd::ty::{int_ty, signal_ty}; @@ -37,14 +37,22 @@ impl ModuleDeclaration { let input_info = &Self::get_port_info(json_ports, Tag::INPUT); let output_info = &Self::get_port_info(json_ports, Tag::OUTPUT); + let mut module_context = ModuleContext::new(); // TO-DO: context for nested analysis + let mut arg_table = HashMap::new(); for (name, width) in input_info { let arg = entity_signature.add_input(signal_ty(int_ty(width.clone()))); arg_table.insert(arg, name.to_string()); + module_context + .arg_info + .insert(arg, ArgInfo::new(name, width)); } for (name, width) in output_info { let arg = entity_signature.add_output(signal_ty(int_ty(width.clone()))); arg_table.insert(arg, name.to_string()); + module_context + .arg_info + .insert(arg, ArgInfo::new(name, width)); } let mut entity_data = UnitData::new(UnitKind::Entity, entity_name, entity_signature); diff --git a/test/counter-cst.json b/test/counter-cst.json index d5e4b88..076b45d 100644 --- a/test/counter-cst.json +++ b/test/counter-cst.json @@ -1 +1,1241 @@ -{"counter.v":{"tree":{"children":[{"children":[{"children":[{"end":149,"start":143,"tag":"module"},{"end":157,"start":150,"tag":"SymbolIdentifier","text":"counter"},{"children":[{"end":158,"start":157,"tag":"("},{"children":[{"children":[{"children":[{"children":[{"end":161,"start":158,"tag":"SymbolIdentifier","text":"clk"}],"tag":"kUnqualifiedId"}],"tag":"kPortReference"}],"tag":"kPort"},{"end":162,"start":161,"tag":","},{"children":[{"children":[{"children":[{"end":167,"start":162,"tag":"SymbolIdentifier","text":"reset"}],"tag":"kUnqualifiedId"}],"tag":"kPortReference"}],"tag":"kPort"},{"end":168,"start":167,"tag":","},{"children":[{"children":[{"children":[{"end":175,"start":168,"tag":"SymbolIdentifier","text":"up_down"}],"tag":"kUnqualifiedId"}],"tag":"kPortReference"}],"tag":"kPort"},{"end":176,"start":175,"tag":","},{"children":[{"children":[{"children":[{"end":180,"start":176,"tag":"SymbolIdentifier","text":"load"}],"tag":"kUnqualifiedId"}],"tag":"kPortReference"}],"tag":"kPort"},{"end":181,"start":180,"tag":","},{"children":[{"children":[{"children":[{"end":185,"start":181,"tag":"SymbolIdentifier","text":"data"}],"tag":"kUnqualifiedId"}],"tag":"kPortReference"}],"tag":"kPort"},{"end":186,"start":185,"tag":","},{"children":[{"children":[{"children":[{"end":191,"start":186,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kPortReference"}],"tag":"kPort"}],"tag":"kPortDeclarationList"},{"end":192,"start":191,"tag":")"}],"tag":"kParenGroup"},{"end":193,"start":192,"tag":";"}],"tag":"kModuleHeader"},{"children":[{"children":[{"end":234,"start":229,"tag":"input"},{"children":[{"children":[{"children":[{"end":238,"start":235,"tag":"SymbolIdentifier","text":"clk"}],"tag":"kUnqualifiedId"},{"children":[null],"tag":"kUnpackedDimensions"}],"tag":"kIdentifierUnpackedDimensions"},{"end":239,"start":238,"tag":","},{"children":[{"end":244,"start":239,"tag":"SymbolIdentifier","text":"reset"},{"children":[null],"tag":"kUnpackedDimensions"}],"tag":"kIdentifierUnpackedDimensions"},{"end":245,"start":244,"tag":","},{"children":[{"end":249,"start":245,"tag":"SymbolIdentifier","text":"load"},{"children":[null],"tag":"kUnpackedDimensions"}],"tag":"kIdentifierUnpackedDimensions"},{"end":250,"start":249,"tag":","},{"children":[{"end":257,"start":250,"tag":"SymbolIdentifier","text":"up_down"},{"children":[null],"tag":"kUnpackedDimensions"}],"tag":"kIdentifierUnpackedDimensions"}],"tag":"kIdentifierList"},{"end":258,"start":257,"tag":";"}],"tag":"kModulePortDeclaration"},{"children":[{"end":266,"start":261,"tag":"input"},{"children":[{"children":[{"children":[{"end":268,"start":267,"tag":"["},{"children":[{"children":[{"end":269,"start":268,"tag":"TK_DecNumber","text":"3"}],"tag":"kNumber"}],"tag":"kExpression"},{"end":270,"start":269,"tag":":"},{"children":[{"children":[{"end":271,"start":270,"tag":"TK_DecNumber","text":"0"}],"tag":"kNumber"}],"tag":"kExpression"},{"end":272,"start":271,"tag":"]"}],"tag":"kDimensionRange"}],"tag":"kDeclarationDimensions"}],"tag":"kPackedDimensions"},{"children":[{"children":[{"end":277,"start":273,"tag":"SymbolIdentifier","text":"data"},{"children":[null],"tag":"kUnpackedDimensions"}],"tag":"kIdentifierUnpackedDimensions"}],"tag":"kIdentifierUnpackedDimensionsList"},{"end":278,"start":277,"tag":";"}],"tag":"kModulePortDeclaration"},{"children":[{"end":287,"start":281,"tag":"output"},{"children":[{"children":[{"children":[{"end":293,"start":292,"tag":"["},{"children":[{"children":[{"end":294,"start":293,"tag":"TK_DecNumber","text":"3"}],"tag":"kNumber"}],"tag":"kExpression"},{"end":295,"start":294,"tag":":"},{"children":[{"children":[{"end":296,"start":295,"tag":"TK_DecNumber","text":"0"}],"tag":"kNumber"}],"tag":"kExpression"},{"end":297,"start":296,"tag":"]"}],"tag":"kDimensionRange"}],"tag":"kDeclarationDimensions"}],"tag":"kPackedDimensions"},{"children":[{"children":[{"end":303,"start":298,"tag":"SymbolIdentifier","text":"count"}],"tag":"kPortIdentifier"}],"tag":"kPortIdentifierList"},{"end":304,"start":303,"tag":";"}],"tag":"kModulePortDeclaration"},{"children":[{"end":392,"start":386,"tag":"always"},{"children":[{"children":[{"end":393,"start":392,"tag":"@"},{"children":[{"end":394,"start":393,"tag":"("},{"children":[{"children":[{"end":401,"start":394,"tag":"posedge"},{"children":[{"children":[{"children":[{"children":[{"children":[{"end":405,"start":402,"tag":"SymbolIdentifier","text":"clk"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kExpression"}],"tag":"kEventExpression"}],"tag":"kEventExpressionList"},{"end":406,"start":405,"tag":")"}],"tag":"kParenGroup"}],"tag":"kEventControl"},{"children":[{"children":[{"end":414,"start":409,"tag":"begin"}],"tag":"kBegin"},{"children":[{"children":[{"children":[{"children":[{"end":421,"start":419,"tag":"if"},{"children":[{"end":422,"start":421,"tag":"("},{"children":[{"children":[{"children":[{"children":[{"children":[{"end":427,"start":422,"tag":"SymbolIdentifier","text":"reset"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kExpression"},{"end":428,"start":427,"tag":")"}],"tag":"kParenGroup"}],"tag":"kIfHeader"},{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"end":465,"start":460,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kLPValue"},{"end":468,"start":466,"tag":"<="},{"children":[{"children":[{"end":470,"start":469,"tag":"TK_DecNumber","text":"0"}],"tag":"kNumber"}],"tag":"kExpression"},{"end":471,"start":470,"tag":";"}],"tag":"kNonblockingAssignmentStatement"}],"tag":"kIfBody"}],"tag":"kIfClause"},{"children":[{"end":480,"start":476,"tag":"else"},{"children":[{"children":[{"children":[{"children":[{"end":483,"start":481,"tag":"if"},{"children":[{"end":484,"start":483,"tag":"("},{"children":[{"children":[{"children":[{"children":[{"children":[{"end":488,"start":484,"tag":"SymbolIdentifier","text":"load"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kExpression"},{"end":489,"start":488,"tag":")"}],"tag":"kParenGroup"}],"tag":"kIfHeader"},{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"end":539,"start":534,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kLPValue"},{"end":542,"start":540,"tag":"<="},{"children":[{"children":[{"children":[{"children":[{"children":[{"end":547,"start":543,"tag":"SymbolIdentifier","text":"data"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kExpression"},{"end":548,"start":547,"tag":";"}],"tag":"kNonblockingAssignmentStatement"}],"tag":"kIfBody"}],"tag":"kIfClause"},{"children":[{"end":557,"start":553,"tag":"else"},{"children":[{"children":[{"children":[{"children":[{"end":560,"start":558,"tag":"if"},{"children":[{"end":561,"start":560,"tag":"("},{"children":[{"children":[{"children":[{"children":[{"children":[{"end":568,"start":561,"tag":"SymbolIdentifier","text":"up_down"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kExpression"},{"end":569,"start":568,"tag":")"}],"tag":"kParenGroup"}],"tag":"kIfHeader"},{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"end":599,"start":594,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kLPValue"},{"end":602,"start":600,"tag":"<="},{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"end":608,"start":603,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"},{"end":610,"start":609,"tag":"+"},{"children":[{"end":612,"start":611,"tag":"TK_DecNumber","text":"1"}],"tag":"kNumber"}],"tag":"kBinaryExpression"}],"tag":"kExpression"},{"end":613,"start":612,"tag":";"}],"tag":"kNonblockingAssignmentStatement"}],"tag":"kIfBody"}],"tag":"kIfClause"},{"children":[{"end":622,"start":618,"tag":"else"},{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"end":658,"start":653,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"}],"tag":"kLPValue"},{"end":661,"start":659,"tag":"<="},{"children":[{"children":[{"children":[{"children":[{"children":[{"children":[{"end":667,"start":662,"tag":"SymbolIdentifier","text":"count"}],"tag":"kUnqualifiedId"}],"tag":"kLocalRoot"}],"tag":"kReference"}],"tag":"kReferenceCallBase"},{"end":669,"start":668,"tag":"-"},{"children":[{"end":671,"start":670,"tag":"TK_DecNumber","text":"1"}],"tag":"kNumber"}],"tag":"kBinaryExpression"}],"tag":"kExpression"},{"end":672,"start":671,"tag":";"}],"tag":"kNonblockingAssignmentStatement"}],"tag":"kElseBody"}],"tag":"kElseClause"}],"tag":"kConditionalStatement"}],"tag":"kElseBody"}],"tag":"kElseClause"}],"tag":"kConditionalStatement"}],"tag":"kElseBody"}],"tag":"kElseClause"}],"tag":"kConditionalStatement"}],"tag":"kBlockItemStatementList"},{"children":[{"end":678,"start":675,"tag":"end"}],"tag":"kEnd"}],"tag":"kSeqBlock"}],"tag":"kProceduralTimingControlStatement"}],"tag":"kAlwaysStatement"}],"tag":"kModuleItemList"},{"end":688,"start":679,"tag":"endmodule"},{"children":[{"end":690,"start":689,"tag":":"},{"end":697,"start":690,"tag":"SymbolIdentifier","text":"counter"}],"tag":"kLabel"}],"tag":"kModuleDeclaration"}],"tag":"kDescriptionList"}}} \ No newline at end of file +{ + "counter.v": { + "tree": { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 149, + "start": 143, + "tag": "module" + }, + { + "end": 157, + "start": 150, + "tag": "SymbolIdentifier", + "text": "counter" + }, + { + "children": [ + { + "end": 158, + "start": 157, + "tag": "(" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 161, + "start": 158, + "tag": "SymbolIdentifier", + "text": "clk" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kPortReference" + } + ], + "tag": "kPort" + }, + { + "end": 162, + "start": 161, + "tag": "," + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 167, + "start": 162, + "tag": "SymbolIdentifier", + "text": "reset" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kPortReference" + } + ], + "tag": "kPort" + }, + { + "end": 168, + "start": 167, + "tag": "," + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 175, + "start": 168, + "tag": "SymbolIdentifier", + "text": "up_down" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kPortReference" + } + ], + "tag": "kPort" + }, + { + "end": 176, + "start": 175, + "tag": "," + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 180, + "start": 176, + "tag": "SymbolIdentifier", + "text": "load" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kPortReference" + } + ], + "tag": "kPort" + }, + { + "end": 181, + "start": 180, + "tag": "," + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 185, + "start": 181, + "tag": "SymbolIdentifier", + "text": "data" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kPortReference" + } + ], + "tag": "kPort" + }, + { + "end": 186, + "start": 185, + "tag": "," + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 191, + "start": 186, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kPortReference" + } + ], + "tag": "kPort" + } + ], + "tag": "kPortDeclarationList" + }, + { + "end": 192, + "start": 191, + "tag": ")" + } + ], + "tag": "kParenGroup" + }, + { + "end": 193, + "start": 192, + "tag": ";" + } + ], + "tag": "kModuleHeader" + }, + { + "children": [ + { + "children": [ + { + "end": 234, + "start": 229, + "tag": "input" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 238, + "start": 235, + "tag": "SymbolIdentifier", + "text": "clk" + } + ], + "tag": "kUnqualifiedId" + }, + { + "children": [ + null + ], + "tag": "kUnpackedDimensions" + } + ], + "tag": "kIdentifierUnpackedDimensions" + }, + { + "end": 239, + "start": 238, + "tag": "," + }, + { + "children": [ + { + "end": 244, + "start": 239, + "tag": "SymbolIdentifier", + "text": "reset" + }, + { + "children": [ + null + ], + "tag": "kUnpackedDimensions" + } + ], + "tag": "kIdentifierUnpackedDimensions" + }, + { + "end": 245, + "start": 244, + "tag": "," + }, + { + "children": [ + { + "end": 249, + "start": 245, + "tag": "SymbolIdentifier", + "text": "load" + }, + { + "children": [ + null + ], + "tag": "kUnpackedDimensions" + } + ], + "tag": "kIdentifierUnpackedDimensions" + }, + { + "end": 250, + "start": 249, + "tag": "," + }, + { + "children": [ + { + "end": 257, + "start": 250, + "tag": "SymbolIdentifier", + "text": "up_down" + }, + { + "children": [ + null + ], + "tag": "kUnpackedDimensions" + } + ], + "tag": "kIdentifierUnpackedDimensions" + } + ], + "tag": "kIdentifierList" + }, + { + "end": 258, + "start": 257, + "tag": ";" + } + ], + "tag": "kModulePortDeclaration" + }, + { + "children": [ + { + "end": 266, + "start": 261, + "tag": "input" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 268, + "start": 267, + "tag": "[" + }, + { + "children": [ + { + "children": [ + { + "end": 269, + "start": 268, + "tag": "TK_DecNumber", + "text": "3" + } + ], + "tag": "kNumber" + } + ], + "tag": "kExpression" + }, + { + "end": 270, + "start": 269, + "tag": ":" + }, + { + "children": [ + { + "children": [ + { + "end": 271, + "start": 270, + "tag": "TK_DecNumber", + "text": "0" + } + ], + "tag": "kNumber" + } + ], + "tag": "kExpression" + }, + { + "end": 272, + "start": 271, + "tag": "]" + } + ], + "tag": "kDimensionRange" + } + ], + "tag": "kDeclarationDimensions" + } + ], + "tag": "kPackedDimensions" + }, + { + "children": [ + { + "children": [ + { + "end": 277, + "start": 273, + "tag": "SymbolIdentifier", + "text": "data" + }, + { + "children": [ + null + ], + "tag": "kUnpackedDimensions" + } + ], + "tag": "kIdentifierUnpackedDimensions" + } + ], + "tag": "kIdentifierUnpackedDimensionsList" + }, + { + "end": 278, + "start": 277, + "tag": ";" + } + ], + "tag": "kModulePortDeclaration" + }, + { + "children": [ + { + "end": 287, + "start": 281, + "tag": "output" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 293, + "start": 292, + "tag": "[" + }, + { + "children": [ + { + "children": [ + { + "end": 294, + "start": 293, + "tag": "TK_DecNumber", + "text": "3" + } + ], + "tag": "kNumber" + } + ], + "tag": "kExpression" + }, + { + "end": 295, + "start": 294, + "tag": ":" + }, + { + "children": [ + { + "children": [ + { + "end": 296, + "start": 295, + "tag": "TK_DecNumber", + "text": "0" + } + ], + "tag": "kNumber" + } + ], + "tag": "kExpression" + }, + { + "end": 297, + "start": 296, + "tag": "]" + } + ], + "tag": "kDimensionRange" + } + ], + "tag": "kDeclarationDimensions" + } + ], + "tag": "kPackedDimensions" + }, + { + "children": [ + { + "children": [ + { + "end": 303, + "start": 298, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kPortIdentifier" + } + ], + "tag": "kPortIdentifierList" + }, + { + "end": 304, + "start": 303, + "tag": ";" + } + ], + "tag": "kModulePortDeclaration" + }, + { + "children": [ + { + "end": 392, + "start": 386, + "tag": "always" + }, + { + "children": [ + { + "children": [ + { + "end": 393, + "start": 392, + "tag": "@" + }, + { + "children": [ + { + "end": 394, + "start": 393, + "tag": "(" + }, + { + "children": [ + { + "children": [ + { + "end": 401, + "start": 394, + "tag": "posedge" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 405, + "start": 402, + "tag": "SymbolIdentifier", + "text": "clk" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kExpression" + } + ], + "tag": "kEventExpression" + } + ], + "tag": "kEventExpressionList" + }, + { + "end": 406, + "start": 405, + "tag": ")" + } + ], + "tag": "kParenGroup" + } + ], + "tag": "kEventControl" + }, + { + "children": [ + { + "children": [ + { + "end": 414, + "start": 409, + "tag": "begin" + } + ], + "tag": "kBegin" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 421, + "start": 419, + "tag": "if" + }, + { + "children": [ + { + "end": 422, + "start": 421, + "tag": "(" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 427, + "start": 422, + "tag": "SymbolIdentifier", + "text": "reset" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kExpression" + }, + { + "end": 428, + "start": 427, + "tag": ")" + } + ], + "tag": "kParenGroup" + } + ], + "tag": "kIfHeader" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 465, + "start": 460, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kLPValue" + }, + { + "end": 468, + "start": 466, + "tag": "<=" + }, + { + "children": [ + { + "children": [ + { + "end": 470, + "start": 469, + "tag": "TK_DecNumber", + "text": "0" + } + ], + "tag": "kNumber" + } + ], + "tag": "kExpression" + }, + { + "end": 471, + "start": 470, + "tag": ";" + } + ], + "tag": "kNonblockingAssignmentStatement" + } + ], + "tag": "kIfBody" + } + ], + "tag": "kIfClause" + }, + { + "children": [ + { + "end": 480, + "start": 476, + "tag": "else" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 483, + "start": 481, + "tag": "if" + }, + { + "children": [ + { + "end": 484, + "start": 483, + "tag": "(" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 488, + "start": 484, + "tag": "SymbolIdentifier", + "text": "load" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kExpression" + }, + { + "end": 489, + "start": 488, + "tag": ")" + } + ], + "tag": "kParenGroup" + } + ], + "tag": "kIfHeader" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 539, + "start": 534, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kLPValue" + }, + { + "end": 542, + "start": 540, + "tag": "<=" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 547, + "start": 543, + "tag": "SymbolIdentifier", + "text": "data" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kExpression" + }, + { + "end": 548, + "start": 547, + "tag": ";" + } + ], + "tag": "kNonblockingAssignmentStatement" + } + ], + "tag": "kIfBody" + } + ], + "tag": "kIfClause" + }, + { + "children": [ + { + "end": 557, + "start": 553, + "tag": "else" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 560, + "start": 558, + "tag": "if" + }, + { + "children": [ + { + "end": 561, + "start": 560, + "tag": "(" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 568, + "start": 561, + "tag": "SymbolIdentifier", + "text": "up_down" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kExpression" + }, + { + "end": 569, + "start": 568, + "tag": ")" + } + ], + "tag": "kParenGroup" + } + ], + "tag": "kIfHeader" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 599, + "start": 594, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kLPValue" + }, + { + "end": 602, + "start": 600, + "tag": "<=" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 608, + "start": 603, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + }, + { + "end": 610, + "start": 609, + "tag": "+" + }, + { + "children": [ + { + "end": 612, + "start": 611, + "tag": "TK_DecNumber", + "text": "1" + } + ], + "tag": "kNumber" + } + ], + "tag": "kBinaryExpression" + } + ], + "tag": "kExpression" + }, + { + "end": 613, + "start": 612, + "tag": ";" + } + ], + "tag": "kNonblockingAssignmentStatement" + } + ], + "tag": "kIfBody" + } + ], + "tag": "kIfClause" + }, + { + "children": [ + { + "end": 622, + "start": 618, + "tag": "else" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 658, + "start": 653, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + } + ], + "tag": "kLPValue" + }, + { + "end": 661, + "start": 659, + "tag": "<=" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "end": 667, + "start": 662, + "tag": "SymbolIdentifier", + "text": "count" + } + ], + "tag": "kUnqualifiedId" + } + ], + "tag": "kLocalRoot" + } + ], + "tag": "kReference" + } + ], + "tag": "kReferenceCallBase" + }, + { + "end": 669, + "start": 668, + "tag": "-" + }, + { + "children": [ + { + "end": 671, + "start": 670, + "tag": "TK_DecNumber", + "text": "1" + } + ], + "tag": "kNumber" + } + ], + "tag": "kBinaryExpression" + } + ], + "tag": "kExpression" + }, + { + "end": 672, + "start": 671, + "tag": ";" + } + ], + "tag": "kNonblockingAssignmentStatement" + } + ], + "tag": "kElseBody" + } + ], + "tag": "kElseClause" + } + ], + "tag": "kConditionalStatement" + } + ], + "tag": "kElseBody" + } + ], + "tag": "kElseClause" + } + ], + "tag": "kConditionalStatement" + } + ], + "tag": "kElseBody" + } + ], + "tag": "kElseClause" + } + ], + "tag": "kConditionalStatement" + } + ], + "tag": "kBlockItemStatementList" + }, + { + "children": [ + { + "end": 678, + "start": 675, + "tag": "end" + } + ], + "tag": "kEnd" + } + ], + "tag": "kSeqBlock" + } + ], + "tag": "kProceduralTimingControlStatement" + } + ], + "tag": "kAlwaysStatement" + } + ], + "tag": "kModuleItemList" + }, + { + "end": 688, + "start": 679, + "tag": "endmodule" + }, + { + "children": [ + { + "end": 690, + "start": 689, + "tag": ":" + }, + { + "end": 697, + "start": 690, + "tag": "SymbolIdentifier", + "text": "counter" + } + ], + "tag": "kLabel" + } + ], + "tag": "kModuleDeclaration" + } + ], + "tag": "kDescriptionList" + } + } +} diff --git a/test/counter-cst.json.orig b/test/counter-cst.json.orig deleted file mode 100644 index f607962..0000000 --- a/test/counter-cst.json.orig +++ /dev/null @@ -1,1289 +0,0 @@ -{ - "counter.v": { - "tree": { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 149, - "start": 143, - "tag": "module" - }, - null, - { - "end": 157, - "start": 150, - "tag": "SymbolIdentifier", - "text": "counter" - }, - null, - null, - { - "children": [ - { - "end": 158, - "start": 157, - "tag": "(" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 161, - "start": 158, - "tag": "SymbolIdentifier", - "text": "clk" - }, - null - ], - "tag": "kUnqualifiedId" - }, - null - ], - "tag": "kPortReference" - }, - null - ], - "tag": "kPort" - }, - { - "end": 162, - "start": 161, - "tag": "," - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 167, - "start": 162, - "tag": "SymbolIdentifier", - "text": "reset" - }, - null - ], - "tag": "kUnqualifiedId" - }, - null - ], - "tag": "kPortReference" - }, - null - ], - "tag": "kPort" - }, - { - "end": 168, - "start": 167, - "tag": "," - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 175, - "start": 168, - "tag": "SymbolIdentifier", - "text": "up_down" - }, - null - ], - "tag": "kUnqualifiedId" - }, - null - ], - "tag": "kPortReference" - }, - null - ], - "tag": "kPort" - }, - { - "end": 176, - "start": 175, - "tag": "," - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 180, - "start": 176, - "tag": "SymbolIdentifier", - "text": "load" - }, - null - ], - "tag": "kUnqualifiedId" - }, - null - ], - "tag": "kPortReference" - }, - null - ], - "tag": "kPort" - }, - { - "end": 181, - "start": 180, - "tag": "," - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 185, - "start": 181, - "tag": "SymbolIdentifier", - "text": "data" - }, - null - ], - "tag": "kUnqualifiedId" - }, - null - ], - "tag": "kPortReference" - }, - null - ], - "tag": "kPort" - }, - { - "end": 186, - "start": 185, - "tag": "," - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 191, - "start": 186, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - }, - null - ], - "tag": "kPortReference" - }, - null - ], - "tag": "kPort" - } - ], - "tag": "kPortDeclarationList" - }, - { - "end": 192, - "start": 191, - "tag": ")" - } - ], - "tag": "kParenGroup" - }, - null, - { - "end": 193, - "start": 192, - "tag": ";" - } - ], - "tag": "kModuleHeader" - }, - { - "children": [ - { - "children": [ - { - "end": 234, - "start": 229, - "tag": "input" - }, - null, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 238, - "start": 235, - "tag": "SymbolIdentifier", - "text": "clk" - }, - null - ], - "tag": "kUnqualifiedId" - }, - { - "children": [ - null - ], - "tag": "kUnpackedDimensions" - } - ], - "tag": "kIdentifierUnpackedDimensions" - }, - { - "end": 239, - "start": 238, - "tag": "," - }, - { - "children": [ - { - "end": 244, - "start": 239, - "tag": "SymbolIdentifier", - "text": "reset" - }, - { - "children": [ - null - ], - "tag": "kUnpackedDimensions" - } - ], - "tag": "kIdentifierUnpackedDimensions" - }, - { - "end": 245, - "start": 244, - "tag": "," - }, - { - "children": [ - { - "end": 249, - "start": 245, - "tag": "SymbolIdentifier", - "text": "load" - }, - { - "children": [ - null - ], - "tag": "kUnpackedDimensions" - } - ], - "tag": "kIdentifierUnpackedDimensions" - }, - { - "end": 250, - "start": 249, - "tag": "," - }, - { - "children": [ - { - "end": 257, - "start": 250, - "tag": "SymbolIdentifier", - "text": "up_down" - }, - { - "children": [ - null - ], - "tag": "kUnpackedDimensions" - } - ], - "tag": "kIdentifierUnpackedDimensions" - } - ], - "tag": "kIdentifierList" - }, - { - "end": 258, - "start": 257, - "tag": ";" - } - ], - "tag": "kModulePortDeclaration" - }, - { - "children": [ - { - "end": 266, - "start": 261, - "tag": "input" - }, - null, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 268, - "start": 267, - "tag": "[" - }, - { - "children": [ - { - "children": [ - { - "end": 269, - "start": 268, - "tag": "TK_DecNumber", - "text": "3" - } - ], - "tag": "kNumber" - } - ], - "tag": "kExpression" - }, - { - "end": 270, - "start": 269, - "tag": ":" - }, - { - "children": [ - { - "children": [ - { - "end": 271, - "start": 270, - "tag": "TK_DecNumber", - "text": "0" - } - ], - "tag": "kNumber" - } - ], - "tag": "kExpression" - }, - { - "end": 272, - "start": 271, - "tag": "]" - } - ], - "tag": "kDimensionRange" - } - ], - "tag": "kDeclarationDimensions" - } - ], - "tag": "kPackedDimensions" - }, - null, - { - "children": [ - { - "children": [ - { - "end": 277, - "start": 273, - "tag": "SymbolIdentifier", - "text": "data" - }, - { - "children": [ - null - ], - "tag": "kUnpackedDimensions" - } - ], - "tag": "kIdentifierUnpackedDimensions" - } - ], - "tag": "kIdentifierUnpackedDimensionsList" - }, - { - "end": 278, - "start": 277, - "tag": ";" - } - ], - "tag": "kModulePortDeclaration" - }, - { - "children": [ - { - "end": 287, - "start": 281, - "tag": "output" - }, - null, - null, - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 293, - "start": 292, - "tag": "[" - }, - { - "children": [ - { - "children": [ - { - "end": 294, - "start": 293, - "tag": "TK_DecNumber", - "text": "3" - } - ], - "tag": "kNumber" - } - ], - "tag": "kExpression" - }, - { - "end": 295, - "start": 294, - "tag": ":" - }, - { - "children": [ - { - "children": [ - { - "end": 296, - "start": 295, - "tag": "TK_DecNumber", - "text": "0" - } - ], - "tag": "kNumber" - } - ], - "tag": "kExpression" - }, - { - "end": 297, - "start": 296, - "tag": "]" - } - ], - "tag": "kDimensionRange" - } - ], - "tag": "kDeclarationDimensions" - } - ], - "tag": "kPackedDimensions" - }, - { - "children": [ - { - "children": [ - { - "end": 303, - "start": 298, - "tag": "SymbolIdentifier", - "text": "count" - } - ], - "tag": "kPortIdentifier" - } - ], - "tag": "kPortIdentifierList" - }, - { - "end": 304, - "start": 303, - "tag": ";" - } - ], - "tag": "kModulePortDeclaration" - }, - { - "children": [ - { - "end": 392, - "start": 386, - "tag": "always" - }, - { - "children": [ - { - "children": [ - { - "end": 393, - "start": 392, - "tag": "@" - }, - { - "children": [ - { - "end": 394, - "start": 393, - "tag": "(" - }, - { - "children": [ - { - "children": [ - { - "end": 401, - "start": 394, - "tag": "posedge" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 405, - "start": 402, - "tag": "SymbolIdentifier", - "text": "clk" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kExpression" - } - ], - "tag": "kEventExpression" - } - ], - "tag": "kEventExpressionList" - }, - { - "end": 406, - "start": 405, - "tag": ")" - } - ], - "tag": "kParenGroup" - } - ], - "tag": "kEventControl" - }, - { - "children": [ - { - "children": [ - { - "end": 414, - "start": 409, - "tag": "begin" - }, - null - ], - "tag": "kBegin" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - null, - { - "end": 421, - "start": 419, - "tag": "if" - }, - { - "children": [ - { - "end": 422, - "start": 421, - "tag": "(" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 427, - "start": 422, - "tag": "SymbolIdentifier", - "text": "reset" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kExpression" - }, - { - "end": 428, - "start": 427, - "tag": ")" - } - ], - "tag": "kParenGroup" - } - ], - "tag": "kIfHeader" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 465, - "start": 460, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kLPValue" - }, - { - "end": 468, - "start": 466, - "tag": "<=" - }, - null, - { - "children": [ - { - "children": [ - { - "end": 470, - "start": 469, - "tag": "TK_DecNumber", - "text": "0" - } - ], - "tag": "kNumber" - } - ], - "tag": "kExpression" - }, - { - "end": 471, - "start": 470, - "tag": ";" - } - ], - "tag": "kNonblockingAssignmentStatement" - } - ], - "tag": "kIfBody" - } - ], - "tag": "kIfClause" - }, - { - "children": [ - { - "end": 480, - "start": 476, - "tag": "else" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - null, - { - "end": 483, - "start": 481, - "tag": "if" - }, - { - "children": [ - { - "end": 484, - "start": 483, - "tag": "(" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 488, - "start": 484, - "tag": "SymbolIdentifier", - "text": "load" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kExpression" - }, - { - "end": 489, - "start": 488, - "tag": ")" - } - ], - "tag": "kParenGroup" - } - ], - "tag": "kIfHeader" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 539, - "start": 534, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kLPValue" - }, - { - "end": 542, - "start": 540, - "tag": "<=" - }, - null, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 547, - "start": 543, - "tag": "SymbolIdentifier", - "text": "data" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kExpression" - }, - { - "end": 548, - "start": 547, - "tag": ";" - } - ], - "tag": "kNonblockingAssignmentStatement" - } - ], - "tag": "kIfBody" - } - ], - "tag": "kIfClause" - }, - { - "children": [ - { - "end": 557, - "start": 553, - "tag": "else" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - null, - { - "end": 560, - "start": 558, - "tag": "if" - }, - { - "children": [ - { - "end": 561, - "start": 560, - "tag": "(" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 568, - "start": 561, - "tag": "SymbolIdentifier", - "text": "up_down" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kExpression" - }, - { - "end": 569, - "start": 568, - "tag": ")" - } - ], - "tag": "kParenGroup" - } - ], - "tag": "kIfHeader" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 599, - "start": 594, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kLPValue" - }, - { - "end": 602, - "start": 600, - "tag": "<=" - }, - null, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 608, - "start": 603, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - }, - { - "end": 610, - "start": 609, - "tag": "+" - }, - { - "children": [ - { - "end": 612, - "start": 611, - "tag": "TK_DecNumber", - "text": "1" - } - ], - "tag": "kNumber" - } - ], - "tag": "kBinaryExpression" - } - ], - "tag": "kExpression" - }, - { - "end": 613, - "start": 612, - "tag": ";" - } - ], - "tag": "kNonblockingAssignmentStatement" - } - ], - "tag": "kIfBody" - } - ], - "tag": "kIfClause" - }, - { - "children": [ - { - "end": 622, - "start": 618, - "tag": "else" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 658, - "start": 653, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - } - ], - "tag": "kLPValue" - }, - { - "end": 661, - "start": 659, - "tag": "<=" - }, - null, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "end": 667, - "start": 662, - "tag": "SymbolIdentifier", - "text": "count" - }, - null - ], - "tag": "kUnqualifiedId" - } - ], - "tag": "kLocalRoot" - } - ], - "tag": "kReference" - } - ], - "tag": "kReferenceCallBase" - }, - { - "end": 669, - "start": 668, - "tag": "-" - }, - { - "children": [ - { - "end": 671, - "start": 670, - "tag": "TK_DecNumber", - "text": "1" - } - ], - "tag": "kNumber" - } - ], - "tag": "kBinaryExpression" - } - ], - "tag": "kExpression" - }, - { - "end": 672, - "start": 671, - "tag": ";" - } - ], - "tag": "kNonblockingAssignmentStatement" - } - ], - "tag": "kElseBody" - } - ], - "tag": "kElseClause" - } - ], - "tag": "kConditionalStatement" - } - ], - "tag": "kElseBody" - } - ], - "tag": "kElseClause" - } - ], - "tag": "kConditionalStatement" - } - ], - "tag": "kElseBody" - } - ], - "tag": "kElseClause" - } - ], - "tag": "kConditionalStatement" - } - ], - "tag": "kBlockItemStatementList" - }, - { - "children": [ - { - "end": 678, - "start": 675, - "tag": "end" - }, - null - ], - "tag": "kEnd" - } - ], - "tag": "kSeqBlock" - } - ], - "tag": "kProceduralTimingControlStatement" - } - ], - "tag": "kAlwaysStatement" - } - ], - "tag": "kModuleItemList" - }, - { - "end": 688, - "start": 679, - "tag": "endmodule" - }, - { - "children": [ - { - "end": 690, - "start": 689, - "tag": ":" - }, - { - "end": 697, - "start": 690, - "tag": "SymbolIdentifier", - "text": "counter" - } - ], - "tag": "kLabel" - } - ], - "tag": "kModuleDeclaration" - } - ], - "tag": "kDescriptionList" - } - } -}