44config = {
55 "type" : "api" ,
66 "name" : "Verilator Complete Workflow" ,
7- "description" : "trigger complete verilator workflow" ,
7+ "description" : "trigger complete verilator workflow: clean → verilog → build → sim " ,
88 "path" : "/verilator/run" ,
99 "method" : "POST" ,
1010 "emits" : ["verilator.run" ],
@@ -17,7 +17,7 @@ async def handler(req, context):
1717
1818 config = {
1919 "binary" : body .get ("binary" , "" ),
20- "config" : body .get ("config" , "sims.verilator.BuckyballToyBBSimConfig " ),
20+ "config" : body .get ("config" , "sims.verilator.BuckyballToyVerilatorConfig " ),
2121 "jobs" : body .get ("jobs" , "16" ),
2222 "batch" : body .get ("batch" , False ),
2323 "coverage" : body .get ("coverage" , False ),
@@ -26,26 +26,6 @@ async def handler(req, context):
2626
2727 await context .emit ({"topic" : "verilator.run" , "data" : config })
2828
29- # ==================================================================================
30- # Wait for simulation result
31- #
32- # Expected return result format:
33- # {
34- # "status": 200/400/500,
35- # "body": {
36- # "success": true/false,
37- # "failure": true/false,
38- # "processing": true/false,
39- # "return_code": 0,
40- # other fields
41- # }
42- # }
43- #
44- # Since the Motia framework wraps data in the data field, it needs to be unpacked
45- # if isinstance(result, dict) and 'data' in result:
46- # return result['data']
47- # return result
48- # ==================================================================================
4929 while True :
5030 result = await wait_for_result (context )
5131 if result is not None :
0 commit comments