Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse filesFiles changed (19)
- inference.py+121-109
- models.py+8
- openenv.yaml+9-1
- server/app.py+17-1
- tasks/task1/design_active.v+5-3
- tasks/task1/results.xml+2-2
- tasks/task1/sim_build/sim.vvp+10-10
- tasks/task2/context.md+6-5
- tasks/task2/design_active.v+18-6
- tasks/task2/design_buggy.v+15-6
- tasks/task2/makefile+2-2
- tasks/task2/result.json+83-15
- tasks/task2/results.xml+2-2
- tasks/task2/sim_build/sim.vvp+50-11
- tasks/task2/test_bin_to_gray.pyAdded+80
- tasks/task3/design_active.v+37-37
- tasks/task3/result.json+46-46
- tasks/task3/results.xml+2-4
- tasks/task3/sim_build/sim.vvp+51-51
35 unmodified lines3637383940414243444546474849505152535455565758596061626364654 unmodified lines707172737475124 unmodified lines20020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430535 unmodified linesfrom models import RtlDebuggerAction # type: ignore# --- Configuration -------------------------------------------------------------# OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")# GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")# HF_TOKEN = os.getenv("HF_TOKEN")# if OPENAI_API_KEY:# # Use OpenAI directly# API_BASE_URL = os.getenv("API_BASE_URL") # use default (None) for OpenAI# API_KEY = OPENAI_API_KEY# MODEL_NAME = os.getenv("MODEL_NAME") or "gpt-4o"# elif GEMINI_API_KEY:# # Set defaults for Gemini (which uses an OpenAI-compatible endpoint)# API_BASE_URL = os.getenv("API_BASE_URL") or "https://generativelanguage.googleapis.com/v1beta/openai/"# API_KEY = GEMINI_API_KEY# MODEL_NAME = os.getenv("MODEL_NAME") or "gemini-2.5-flash"# else:# # Fall back to Hugging Face router# API_BASE_URL = os.getenv("API_BASE_URL") or "https://router.huggingface.co/v1"# API_KEY = HF_TOKEN or os.getenv("API_KEY")# MODEL_NAME = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct:novita"API_BASE_URL = os.getenv("API_BASE_URL") or "https://router.huggingface.co/v1"API_KEY = os.getenv("API_KEY") or os.getenv("HF_TOKEN")MODEL_NAME = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct:novita"TASK_NAME = os.getenv("RTL_DEBUGGER_TASK_NAME", "unknown-task")IMAGE_NAME = os.getenv("IMAGE_NAME")4 unmodified linesSUCCESS_SCORE_THRESHOLD = 0.1# --- Prompts -------------------------------------------------------------------SYSTEM_PROMPT = (124 unmodified lineserr_msg = str(exc).lower()if "rate limit" in err_msg or "too many requests" in err_msg or "temporary" in err_msg or attempt < max_retries - 1:wait_time = (2 ** attempt) * 2 # Exponential backoff: 2, 4, 8, 16...print(f"[Retry] Attempt {attempt + 1} failed: {exc}. Retrying in {wait_time}s...")time.sleep(wait_time)else:raise excreturn ""SERVER_URL = os.getenv("RTL_SERVER_URL", "http://localhost:8000")def main() -> None:llm = OpenAI(base_url=API_BASE_URL, api_key=API_KEY)history: List[Tuple[str, str, float]] = [] # (code, feedback, reward) triplesrewards: List[float] = []success = Falsenum_steps = 0final_score = 0.0# final_score is tracked to report at endfinal_score = 0.0try:with RtlDebuggerEnv(base_url=SERVER_URL).sync() as env:# Pass TASK_NAME if specified to select a specific taskreset_options = {"TASK_NAME": TASK_NAME} if TASK_NAME and TASK_NAME != "unknown-task" else Noneresult = env.reset(options=reset_options)obs = result.observationinitial_design = obs.design_codetask_context = obs.task_contextlatest_feedback = obs.feedback# Emit the START line using the actual task_id from the observation# (this handles random task selection correctly)actual_task = obs.task_idprint(f"[START] task={actual_task} env=rtl-debugger model={MODEL_NAME}")if not initial_design:returnfor step in range(1, MAX_STEPS + 1):if result.done:breaknum_steps = stepuser_prompt = _build_user_prompt(step=step,initial_design=initial_design,task_context=task_context,history=history,latest_feedback=latest_feedback,)messages = [{"role": "system", "content": SYSTEM_PROMPT},{"role": "user", "content": user_prompt},]# Initialize log variables for this stepaction_log = "null"last_error = "null"try:response_text = _get_llm_response(llm, messages)code = _extract_verilog(response_text)action_log = json.dumps(code)result = env.step(RtlDebuggerAction(fixed_code=code))obs = result.observationlatest_feedback = obs.feedbackrewards.append(result.reward)history.append((code, obs.feedback, result.reward))final_score = obs.score# If not everything passed, feedback is considered the current errorif not result.done:if obs.compiled:# Simplified message for successful compiles that failed testslast_error = json.dumps(f"Compiled, Pass ratio: {obs.pass_rate:.2f}")else:# Show full feedback for compile errorslast_error = json.dumps(obs.feedback)except Exception as exc:last_error = json.dumps(str(exc))done_str = "false"print(f"[STEP] step={step} action={action_log} reward=0.00 done={done_str} error={last_error}")break# Emit the STEP line per specdone_str = "true" if result.done else "false"print(f"[STEP] step={step} action={action_log} reward={result.reward:0.2f} done={done_str} error={last_error}")finally:# Emit the END line (always)rewards_str = ",".join([f"{r:0.2f}" for r in rewards])final_score = max(0.01, min(0.99, final_score))success = final_score >= SUCCESS_SCORE_THRESHOLDsuccess_str = "true" if success else "false"print(f"[END] success={success_str} steps={num_steps} score={final_score:.3f} rewards={rewards_str}")if __name__ == "__main__":35 unmodified lines3637383940414243444546474849505152535455565758596061626364654 unmodified lines7071727374757677124 unmodified lines20220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631735 unmodified linesfrom models import RtlDebuggerAction # type: ignore# --- Configuration -------------------------------------------------------------OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")HF_TOKEN = os.getenv("HF_TOKEN")if OPENAI_API_KEY:# Use OpenAI directlyAPI_BASE_URL = os.getenv("API_BASE_URL") # use default (None) for OpenAIAPI_KEY = OPENAI_API_KEYMODEL_NAME = "gpt-4o"elif GEMINI_API_KEY:# Set defaults for Gemini (which uses an OpenAI-compatible endpoint)API_BASE_URL = "https://generativelanguage.googleapis.com/v1beta/openai/"API_KEY = GEMINI_API_KEYMODEL_NAME = "gemini-2.5-flash"else:# Fall back to Hugging Face routerAPI_BASE_URL = "https://router.huggingface.co/v1"API_KEY = HF_TOKEN or os.getenv("API_KEY")MODEL_NAME = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct:novita"# API_BASE_URL = os.getenv("API_BASE_URL") or "https://router.huggingface.co/v1"# API_KEY = os.getenv("API_KEY") or os.getenv("HF_TOKEN")# MODEL_NAME = os.getenv("MODEL_NAME") or "Qwen/Qwen2.5-72B-Instruct:novita"TASK_NAME = os.getenv("RTL_DEBUGGER_TASK_NAME", "unknown-task")IMAGE_NAME = os.getenv("IMAGE_NAME")4 unmodified linesSUCCESS_SCORE_THRESHOLD = 0.1ENV_BASE_URL = os.getenv("ENV_BASE_URL ", "http://localhost:8000")# --- Prompts -------------------------------------------------------------------SYSTEM_PROMPT = (124 unmodified lineserr_msg = str(exc).lower()if "rate limit" in err_msg or "too many requests" in err_msg or "temporary" in err_msg or attempt < max_retries - 1:wait_time = (2 ** attempt) * 2 # Exponential backoff: 2, 4, 8, 16...print(f"[RETRY] Attempt {attempt + 1} failed: {exc}. Retrying in {wait_time}s...", flush=True)time.sleep(wait_time)else:raise excreturn ""def run_task(env: RtlDebuggerEnv, llm: OpenAI, task_id: str) -> None:"""Run the inference loop for a single task."""history: List[Tuple[str, str, float]] = [] # (code, feedback, reward) triplesrewards: List[float] = []num_steps = 0final_score = 0.0# Pass task_id to select the specific taskreset_options = {"TASK_NAME": task_id}result = env.reset(options=reset_options)obs = result.observationinitial_design = obs.design_codetask_context = obs.task_contextlatest_feedback = obs.feedback# Emit the START line using the actual task_id from the observationactual_task = obs.task_idprint(f"[START] task={actual_task} env=rtl-debugger model={MODEL_NAME}", flush=True)if not initial_design:print(f"[ERROR] Could not load design for task {task_id}", flush=True)returnfor step in range(1, MAX_STEPS + 1):if result.done:breaknum_steps = stepuser_prompt = _build_user_prompt(step=step,initial_design=initial_design,task_context=task_context,history=history,latest_feedback=latest_feedback,)messages = [{"role": "system", "content": SYSTEM_PROMPT},{"role": "user", "content": user_prompt},]# Initialize log variables for this stepaction_log = "null"last_error = "null"try:response_text = _get_llm_response(llm, messages)code = _extract_verilog(response_text)action_log = json.dumps(code)result = env.step(RtlDebuggerAction(fixed_code=code))obs = result.observationlatest_feedback = obs.feedbackrewards.append(result.reward)history.append((code, obs.feedback, result.reward))final_score = obs.score# If not everything passed, feedback is considered the current errorif not result.done:if obs.compiled:# Simplified message for successful compiles that failed testslast_error = json.dumps(f"Compiled, Pass ratio: {obs.pass_rate:.2f}")else:# Show full feedback for compile errorslast_error = json.dumps(obs.feedback)except Exception as exc:last_error = json.dumps(str(exc))done_str = "false"print(f"[STEP] step={step} action={action_log} reward=0.00 done={done_str} error={last_error}", flush=True)break# Emit the STEP line per specdone_str = "true" if result.done else "false"print(f"[STEP] step={step} action={action_log} reward={result.reward:0.2f} done={done_str} error={last_error}", flush=True)# Emit the END line (always)rewards_str = ",".join([f"{r:0.2f}" for r in rewards])final_score = max(0.01, min(0.99, final_score))success = final_score >= SUCCESS_SCORE_THRESHOLDsuccess_str = "true" if success else "false"print(f"[END] success={success_str} steps={num_steps} score={final_score:.2f} rewards={rewards_str}", flush=True)def main() -> None:# 1. Initialize LLM clientllm_client = OpenAI(base_url=API_BASE_URL, api_key=API_KEY)# 2. Determine which tasks to run# Check both TASK_NAME and RTL_DEBUGGER_TASK_NAME for flexibilitytarget_task = os.getenv("TASK_NAME") or os.getenv("RTL_DEBUGGER_TASK_NAME")if target_task and target_task != "unknown-task":tasks_to_run = [target_task]else:tasks_to_run = ["task1", "task2", "task3"]# 3. Connect to the environment and iteratetry:with RtlDebuggerEnv(base_url=ENV_BASE_URL ).sync() as env:for task_id in tasks_to_run:run_task(env, llm_client, task_id)except Exception as e:print(f"[CRITICAL ERROR] Failed to connect to RTL server or run tasks: {e}", flush=True)if __name__ == "__main__":
11 unmodified lines12131415161711 unmodified linesfrom openenv.core.env_server.types import Action, Observationfrom pydantic import Fieldclass RtlDebuggerAction(Action):11 unmodified lines121314151617181920212223242511 unmodified linesfrom openenv.core.env_server.types import Action, Observationfrom pydantic import Fieldfrom dataclasses import dataclass@dataclassclass Task:id: strdescription: strmax_steps: intclass RtlDebuggerAction(Action):
123451 unmodified line78910111213141516171819spec_version: 1name: rtl_debuggertype: spaceruntime: fastapiapp: server.app:app1 unmodified linetasks:- id: task1description: "Easy — syntax/compilation errors"max_steps: 10grader: server.graders:RtlGrader- id: task2description: "Medium — logic errors in combinational circuit"max_steps: 10grader: server.graders:RtlGrader- id: task3description: "Hard — logic errors in sequential circuit"max_steps: 10grader: server.graders:RtlGrader123451 unmodified line789101112131415161718192021222324252627spec_version: 1name: RTL Code Debugging Environmenttype: spaceruntime: fastapiapp: server.app:app1 unmodified linetasks:- id: task1description: "Easy — syntax/compilation errors"difficulty: easymax_steps: 10grader: server.graders:RtlGrader- id: task2description: "Medium — logic errors in combinational circuit"difficulty: mediummax_steps: 10grader: server.graders:RtlGrader- id: task3description: "Hard — logic errors in sequential circuit"difficulty: hardmax_steps: 10grader: server.graders:RtlGraderconstraints:max_runtime_seconds: 1200max_memory_gb: 8max_vcpu: 2
43 unmodified lines44454647484950515243 unmodified linesfrom rtl_debugger_environment import RtlDebuggerEnvironmentexcept ImportError:# Final fallback for unusual execution contextsfrom rtl_debugger.models import RtlDebuggerAction, RtlDebuggerObservationfrom rtl_debugger.server.rtl_debugger_environment import RtlDebuggerEnvironment# Create the app with web interface and README integrationapp = create_app(RtlDebuggerEnvironment,43 unmodified lines4445464748495051525354555657585960616263646566676843 unmodified linesfrom rtl_debugger_environment import RtlDebuggerEnvironmentexcept ImportError:# Final fallback for unusual execution contextsfrom rtl_debugger.models import RtlDebuggerAction, RtlDebuggerObservation, Taskfrom rtl_debugger.server.rtl_debugger_environment import RtlDebuggerEnvironmentdef get_tasks() -> list:"""Return the list of tasks supported by this environment, used by the remote validator."""try:from .models import Taskexcept ImportError:try:from models import Taskexcept ImportError:from rtl_debugger.models import Taskreturn [Task(id="task1", description="Easy — syntax/compilation errors", max_steps=10),Task(id="task2", description="Medium — logic errors in combinational circuit", max_steps=10),Task(id="task3", description="Hard — logic errors in sequential circuit", max_steps=10),]# Create the app with web interface and README integrationapp = create_app(RtlDebuggerEnvironment,
1234567module half_adder(input a, b,output sum, carry);assign sum = a ^ b;assign carry = a & b;endmodule123456789module half_adder(input a,input b,output sum,output carry);assign sum = a ^ b;assign carry = a & b;endmodule
123456<testsuites name="results"><testsuite name="all" package="all"><property name="random_seed" value="1775586650" /><testcase name="test_half_adder" classname="test_half_adder" file="/mnt/c/Users/npkas/Agentic-RL/rtl_debugger/tasks/task0/test_half_adder.py" lineno="12" time="0.016648054122924805" sim_time_ns="4.0" ratio_time="240.26832027725663" /></testsuite></testsuites>123456<testsuites name="results"><testsuite name="all" package="all"><property name="random_seed" value="1775630252" /><testcase name="test_half_adder" classname="test_half_adder" file="/mnt/c/Users/npkas/Agentic-RL/rtl_debugger/tasks/task0/test_half_adder.py" lineno="1" time="0.01133418083190918" sim_time_ns="4.0" ratio_time="352.91478575485394" /></testsuite></testsuites>
7 unmodified lines8910111213141516171819202122232425262728297 unmodified lines:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi";S_0x55da2e457510 .scope package, "$unit" "$unit" 2 1;.timescale -9 -12;S_0x55da2e4576a0 .scope module, "half_adder" "half_adder" 3 1;.timescale -9 -12;.port_info 0 /INPUT 1 "a";.port_info 1 /INPUT 1 "b";.port_info 2 /OUTPUT 1 "sum";.port_info 3 /OUTPUT 1 "carry";o0x7f4667d0f018 .functor BUFZ 1, C4<z>; HiZ driveo0x7f4667d0f048 .functor BUFZ 1, C4<z>; HiZ driveL_0x55da2e49ed00 .functor XOR 1, o0x7f4667d0f018, o0x7f4667d0f048, C4<0>, C4<0>;L_0x55da2e49edf0 .functor AND 1, o0x7f4667d0f018, o0x7f4667d0f048, C4<1>, C4<1>;v0x55da2e469430_0 .net "a", 0 0, o0x7f4667d0f018; 0 driversv0x55da2e49ea00_0 .net "b", 0 0, o0x7f4667d0f048; 0 driversv0x55da2e49eac0_0 .net "carry", 0 0, L_0x55da2e49edf0; 1 driversv0x55da2e49eb90_0 .net "sum", 0 0, L_0x55da2e49ed00; 1 drivers# The file index is used to find the file name in the following table.:file_names 4;"N/A";7 unmodified lines8910111213141516171819202122232425262728297 unmodified lines:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi";S_0x55f0dc01f510 .scope package, "$unit" "$unit" 2 1;.timescale -9 -12;S_0x55f0dc01f6a0 .scope module, "half_adder" "half_adder" 3 1;.timescale -9 -12;.port_info 0 /INPUT 1 "a";.port_info 1 /INPUT 1 "b";.port_info 2 /OUTPUT 1 "sum";.port_info 3 /OUTPUT 1 "carry";o0x7fa1802ff018 .functor BUFZ 1, C4<z>; HiZ driveo0x7fa1802ff048 .functor BUFZ 1, C4<z>; HiZ driveL_0x55f0dc066d00 .functor XOR 1, o0x7fa1802ff018, o0x7fa1802ff048, C4<0>, C4<0>;L_0x55f0dc066df0 .functor AND 1, o0x7fa1802ff018, o0x7fa1802ff048, C4<1>, C4<1>;v0x55f0dc031430_0 .net "a", 0 0, o0x7fa1802ff018; 0 driversv0x55f0dc066a00_0 .net "b", 0 0, o0x7fa1802ff048; 0 driversv0x55f0dc066ac0_0 .net "carry", 0 0, L_0x55f0dc066df0; 1 driversv0x55f0dc066b90_0 .net "sum", 0 0, L_0x55f0dc066d00; 1 drivers# The file index is used to find the file name in the following table.:file_names 4;"N/A";
12345678### TASK: Debug Combinational Logic (XOR Gate)### SPECIFICATION:- Implement a 2-input XOR gate.- Inputs: 'a', 'b'.- Output: 'y'.- Behavior: 'y' should be '1' if 'a' and 'b' are different, '0' otherwise.123456789### TASK: Debug Combinational Logic (Binary to Gray Code Converter)### SPECIFICATION:- Implement a Binary to Gray Code Converter.- Inputs: 'binary' (N-bit binary number).- Output: 'gray' (N-bit gray code).- Behavior: 'gray' should be the gray code representation of 'binary'.Binary code is the standard way of representing numbers in digital systems using bits (0s and 1s). Gray code is a modified binary representation where consecutive values differ by only one bit.
1234567module gate (input wire a,input wire b,output wire y);assign y = a ^ b;endmodule12345678910111213141516171819module bin_gry #(parameter N = 8)(input [N-1:0] binary,output reg [N-1:0] gray);always @ (*) // Use '*' for combinational logic sensitivity listbegin// The most significant bit (MSB) of the Gray code is the same as the MSB of the binary code.gray[N-1] = binary[N-1];// For all other bits, the i-th Gray code bit is the XOR of the i-th binary bit and the (i+1)-th binary bit.// gray[i] = binary[i+1] ^ binary[i]for (integer i = 0; i < N - 1; i = i + 1) begingray[i] = binary[i+1] ^ binary[i];endendendmodule
1234567module gate (input wire a,input wire b,output wire y);assign y = a & b;endmodule12345678910111213141516module bin_gry #(parameter N = 8)(binary ,gray) ;input [N-1:0] binary ;output reg [N-1:0] gray ;always @ (binary)begingray[N-1] = binary[N-1] ;gray[N-2:0] = binary[N-1:1] & binary[N-2:0] ;endendmodule
1234567TOPLEVEL_LANG = verilogVERILOG_SOURCES = design_active.vTOPLEVEL = gateCOCOTB_TEST_MODULES = test_xor_gate_simpleSIM = icarus1234567TOPLEVEL_LANG = verilogVERILOG_SOURCES = design_active.vTOPLEVEL = bin_gryCOCOTB_TEST_MODULES = test_bin_to_graySIM = icarus
12345678910111213142 unmodified lines17181920212223242 unmodified lines272829303132333435363738394041424344454647{"passed": true,"num_tests": 4,"num_passed": 4,"simulation_time": 4.0,"results": [{"test_id": 0,"input": {"a": 0,"b": 0},"expected_output": 0,"actual_output": 0,2 unmodified lines{"test_id": 1,"input": {"a": 0,"b": 1},"expected_output": 1,"actual_output": 1,2 unmodified lines{"test_id": 2,"input": {"a": 1,"b": 0},"expected_output": 1,"actual_output": 1,"pass": true},{"test_id": 3,"input": {"a": 1,"b": 1},"expected_output": 0,"actual_output": 0,"pass": true}]123456789101112132 unmodified lines161718192021222 unmodified lines252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115{"passed": true,"num_tests": 12,"num_passed": 12,"simulation_time": 12.0,"results": [{"test_id": 0,"input": {"binary": 0},"expected_output": 0,"actual_output": 0,2 unmodified lines{"test_id": 1,"input": {"binary": 1},"expected_output": 1,"actual_output": 1,2 unmodified lines{"test_id": 2,"input": {"binary": 2},"expected_output": 3,"actual_output": 3,"pass": true},{"test_id": 3,"input": {"binary": 3},"expected_output": 2,"actual_output": 2,"pass": true},{"test_id": 4,"input": {"binary": 127},"expected_output": 64,"actual_output": 64,"pass": true},{"test_id": 5,"input": {"binary": 255},"expected_output": 128,"actual_output": 128,"pass": true},{"test_id": 6,"input": {"binary": 254},"expected_output": 129,"actual_output": 129,"pass": true},{"test_id": 7,"input": {"binary": 5},"expected_output": 7,"actual_output": 7,"pass": true},{"test_id": 8,"input": {"binary": 10},"expected_output": 15,"actual_output": 15,"pass": true},{"test_id": 9,"input": {"binary": 15},"expected_output": 8,"actual_output": 8,"pass": true},{"test_id": 10,"input": {"binary": 128},"expected_output": 192,"actual_output": 192,"pass": true},{"test_id": 11,"input": {"binary": 127},"expected_output": 64,"actual_output": 64,"pass": true}]
123456<testsuites name="results"><testsuite name="all" package="all"><property name="random_seed" value="1775559296" /><testcase name="test_xor_gate_simple" classname="test_xor_gate_simple" file="/mnt/c/Users/npkas/Agentic-RL/rtl_debugger/tasks/task1/test_xor_gate_simple.py" lineno="12" time="0.003946542739868164" sim_time_ns="4.0" ratio_time="1013.5453392134357" /></testsuite></testsuites>123456<testsuites name="results"><testsuite name="all" package="all"><property name="random_seed" value="1775630292" /><testcase name="test_bin_to_gray" classname="test_bin_to_gray" file="/mnt/c/Users/npkas/Agentic-RL/rtl_debugger/tasks/task2/test_bin_to_gray.py" lineno="20" time="0.021413326263427734" sim_time_ns="12.0" ratio_time="560.3986906272964" /></testsuite></testsuites>
7 unmodified lines8910111213141516171819202122232425267 unmodified lines:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi";S_0x556fbafd5510 .scope package, "$unit" "$unit" 2 1;.timescale -9 -12;S_0x556fbafd56a0 .scope module, "gate" "gate" 3 1;.timescale -9 -12;.port_info 0 /INPUT 1 "a";.port_info 1 /INPUT 1 "b";.port_info 2 /OUTPUT 1 "y";o0x7f7746588018 .functor BUFZ 1, C4<z>; HiZ driveo0x7f7746588048 .functor BUFZ 1, C4<z>; HiZ driveL_0x556fbb01c170 .functor XOR 1, o0x7f7746588018, o0x7f7746588048, C4<0>, C4<0>;v0x556fbafe6d50_0 .net "a", 0 0, o0x7f7746588018; 0 driversv0x556fbafe7430_0 .net "b", 0 0, o0x7f7746588048; 0 driversv0x556fbb01c050_0 .net "y", 0 0, L_0x556fbb01c170; 1 drivers# The file index is used to find the file name in the following table.:file_names 4;"N/A";7 unmodified lines8910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364657 unmodified lines:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi";S_0x55b47534e490 .scope package, "$unit" "$unit" 2 1;.timescale -9 -12;S_0x55b47534e620 .scope module, "bin_gry" "bin_gry" 3 1;.timescale -9 -12;.port_info 0 /INPUT 8 "binary";.port_info 1 /OUTPUT 8 "gray";P_0x55b47534e7b0 .param/l "N" 0 3 1, +C4<00000000000000000000000000001000>;o0x7fe4c9e7a048 .functor BUFZ 8, C4<zzzzzzzz>; HiZ drivev0x55b475360430_0 .net "binary", 7 0, o0x7fe4c9e7a048; 0 driversv0x55b4753987b0_0 .var "gray", 7 0;E_0x55b475387890 .event anyedge, v0x55b475360430_0;S_0x55b475375940 .scope begin, "$ivl_for_loop0" "$ivl_for_loop0" 3 14, 3 14 0, S_0x55b47534e620;.timescale -9 -12;v0x55b47535fd50_0 .var/i "i", 31 0;.scope S_0x55b47534e620;T_0 ;%wait E_0x55b475387890;%load/vec4 v0x55b475360430_0;%parti/s 1, 7, 4;%ix/load 4, 7, 0;%flag_set/imm 4, 0;%store/vec4 v0x55b4753987b0_0, 4, 1;%fork t_1, S_0x55b475375940;%jmp t_0;.scope S_0x55b475375940;t_1 ;%pushi/vec4 0, 0, 32;%store/vec4 v0x55b47535fd50_0, 0, 32;T_0.0 ;%load/vec4 v0x55b47535fd50_0;%cmpi/s 7, 0, 32;%jmp/0xz T_0.1, 5;%load/vec4 v0x55b475360430_0;%load/vec4 v0x55b47535fd50_0;%addi 1, 0, 32;%part/s 1;%load/vec4 v0x55b475360430_0;%load/vec4 v0x55b47535fd50_0;%part/s 1;%xor;%ix/getv/s 4, v0x55b47535fd50_0;%store/vec4 v0x55b4753987b0_0, 4, 1;%load/vec4 v0x55b47535fd50_0;%addi 1, 0, 32;%store/vec4 v0x55b47535fd50_0, 0, 32;%jmp T_0.0;T_0.1 ;%end;.scope S_0x55b47534e620;t_0 %join;%jmp T_0;.thread T_0, $push;# The file index is used to find the file name in the following table.:file_names 4;"N/A";
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980import cocotbfrom cocotb.triggers import Timerfrom cocotb.utils import get_sim_timeimport json
def get_expected_gray(binary_val, N): """Golden Model: Convert binary to Gray code.""" gray = 0 gray |= (binary_val >> (N - 1)) << (N - 1) # MSB same
for i in range(N - 1): bit1 = (binary_val >> (i + 1)) & 1 bit0 = (binary_val >> i) & 1 gray |= (bit1 ^ bit0) << i
return gray
@cocotb.test()async def test_bin_to_gray(dut): """Test binary to gray converter with semantic error feedback for RL agent."""
N = len(dut.binary)
# 10–15 carefully chosen test cases max_val = (1 << N) - 1 test_cases = [ 0, 1, 2, 3, max_val >> 1, max_val, max_val - 1, 5, 10, 15, (1 << (N-1)), # MSB only (1 << (N-1)) - 1 ]
results = [] passed = True first_error_cycle = None
for i, binary_val in enumerate(test_cases): dut.binary.value = binary_val
await Timer(1, units="ns")
actual_out = int(dut.gray.value) gold_out = get_expected_gray(binary_val, N)
ok = (actual_out == gold_out)
if not ok and first_error_cycle is None: first_error_cycle = i passed = False
results.append({ "test_id": i, "input": {"binary": binary_val}, "expected_output": gold_out, "actual_output": actual_out, "pass": ok })
summary = { "passed": passed, "num_tests": len(test_cases), "num_passed": sum(r["pass"] for r in results), "simulation_time": get_sim_time("ns"), "results": results }
with open("result.json", "w") as f: json.dump(summary, f, indent=2)
assert passed, "Some test cases failed"1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162module moore_ol(inp,clk,reset,out);input inp, clk, reset;output reg out;parameter S0 = 0, S1 = 1, S2 = 2, S3 = 3, S4 = 4;reg [2:0] present_state, next_state;always @ (posedge clk or posedge reset)beginif (reset)present_state <= S0;elsepresent_state <= next_state;endalways @ (present_state or inp)begincase (present_state)S0 : beginif (inp)next_state = S1;elsenext_state = S0;out = 0;endS1 : beginif (inp)next_state = S2;elsenext_state = S0;out = 0;endS2 : beginif (inp)next_state = S3; // Corrected: Should go to S3 instead of S1elsenext_state = S0;out = 0;endS3 : beginif (inp)next_state = S4;elsenext_state = S2; // Corrected: Should go to S2 instead of S0out = 0;endS4 : beginif (inp)next_state = S2;elsenext_state = S0; // Corrected: Should go to S0 instead of S3out = 1;enddefault: next_state = S0;endcaseendendmodule1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162module moore_ol(inp,clk,reset,out);input inp, clk, reset;output reg out;parameter S0 = 0 , S1 = 1 , S2 = 2 , S3 = 3, S4 = 4;reg [2:0] present_state, next_state;always @ (posedge clk or posedge reset)beginif(reset)present_state <= S0;elsepresent_state <= next_state;endalways @ (present_state or inp)begincase(present_state)S0 : beginif (inp)next_state = S1;elsenext_state = S0;out = 0;endS1 : beginif (inp)next_state = S2;elsenext_state = S0;out = 0;endS2 : beginif (inp)next_state = S2; // FIX: If current state is S2 (seen '11') and input is '1', the sequence becomes '111'. The longest suffix of '111' that is also a prefix of '1101' is '11'. So, the FSM should remain in S2. It was incorrectly transitioning to S1.elsenext_state = S3;out = 0;endS3 : beginif (inp)next_state = S4;elsenext_state = S0;out = 0;endS4 : beginif (inp)next_state = S2;elsenext_state = S0;out = 1;enddefault: next_state = S0;endcaseendendmodule
123456741 unmodified lines4950515253545556575859606162636465666768697071727374757677789 unmodified lines888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169{"passed": false,"num_tests": 13,"num_passed": 5,"results": [{"test_id": 0,41 unmodified lines"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 0,"transition_to": 0,"transition_to_meaning": "S0: Seen nothing (Reset/Idle)","expected_next_state": 3,"expected_next_state_meaning": "S3: Seen '110'","pass": false},{"test_id": 4,"input": 1,"actual_state": 0,"actual_state_meaning": "S0: Seen nothing (Reset/Idle)","actual_output": 0,"expected_output": 1,"transition_to": 1,"transition_to_meaning": "S1: Seen '1'","expected_next_state": 4,"expected_next_state_meaning": "S4: Seen '1101' (Pattern Detected)","pass": false},{"test_id": 5,"input": 1,"actual_state": 1,"actual_state_meaning": "S1: Seen '1'","actual_output": 0,"expected_output": 0,"transition_to": 2,9 unmodified lines"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 0,"transition_to": 3,"transition_to_meaning": "S3: Seen '110'","expected_next_state": 2,"expected_next_state_meaning": "S2: Seen '11'","pass": false},{"test_id": 7,"input": 0,"actual_state": 3,"actual_state_meaning": "S3: Seen '110'","actual_output": 0,"expected_output": 0,"transition_to": 2,"transition_to_meaning": "S2: Seen '11'","expected_next_state": 3,"expected_next_state_meaning": "S3: Seen '110'","pass": false},{"test_id": 8,"input": 1,"actual_state": 2,"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 1,"transition_to": 3,"transition_to_meaning": "S3: Seen '110'","expected_next_state": 4,"expected_next_state_meaning": "S4: Seen '1101' (Pattern Detected)","pass": false},{"test_id": 9,"input": 1,"actual_state": 3,"actual_state_meaning": "S3: Seen '110'","actual_output": 1,"expected_output": 0,"transition_to": 4,"transition_to_meaning": "S4: Seen '1101' (Pattern Detected)","expected_next_state": 2,"expected_next_state_meaning": "S2: Seen '11'","pass": false},{"test_id": 10,"input": 0,"actual_state": 4,"actual_state_meaning": "S4: Seen '1101' (Pattern Detected)","actual_output": 0,"expected_output": 0,"transition_to": 0,"transition_to_meaning": "S0: Seen nothing (Reset/Idle)","expected_next_state": 3,"expected_next_state_meaning": "S3: Seen '110'","pass": false},{"test_id": 11,"input": 1,"actual_state": 0,"actual_state_meaning": "S0: Seen nothing (Reset/Idle)","actual_output": 0,"expected_output": 1,"transition_to": 1,"transition_to_meaning": "S1: Seen '1'","expected_next_state": 4,"expected_next_state_meaning": "S4: Seen '1101' (Pattern Detected)","pass": false},{"test_id": 12,"input": 0,"actual_state": 1,"actual_state_meaning": "S1: Seen '1'","actual_output": 0,"expected_output": 0,"transition_to": 0,123456741 unmodified lines4950515253545556575859606162636465666768697071727374757677789 unmodified lines888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169{"passed": true,"num_tests": 13,"num_passed": 13,"results": [{"test_id": 0,41 unmodified lines"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 0,"transition_to": 3,"transition_to_meaning": "S3: Seen '110'","expected_next_state": 3,"expected_next_state_meaning": "S3: Seen '110'","pass": true},{"test_id": 4,"input": 1,"actual_state": 3,"actual_state_meaning": "S3: Seen '110'","actual_output": 1,"expected_output": 1,"transition_to": 4,"transition_to_meaning": "S4: Seen '1101' (Pattern Detected)","expected_next_state": 4,"expected_next_state_meaning": "S4: Seen '1101' (Pattern Detected)","pass": true},{"test_id": 5,"input": 1,"actual_state": 4,"actual_state_meaning": "S4: Seen '1101' (Pattern Detected)","actual_output": 0,"expected_output": 0,"transition_to": 2,9 unmodified lines"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 0,"transition_to": 2,"transition_to_meaning": "S2: Seen '11'","expected_next_state": 2,"expected_next_state_meaning": "S2: Seen '11'","pass": true},{"test_id": 7,"input": 0,"actual_state": 2,"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 0,"transition_to": 3,"transition_to_meaning": "S3: Seen '110'","expected_next_state": 3,"expected_next_state_meaning": "S3: Seen '110'","pass": true},{"test_id": 8,"input": 1,"actual_state": 3,"actual_state_meaning": "S3: Seen '110'","actual_output": 1,"expected_output": 1,"transition_to": 4,"transition_to_meaning": "S4: Seen '1101' (Pattern Detected)","expected_next_state": 4,"expected_next_state_meaning": "S4: Seen '1101' (Pattern Detected)","pass": true},{"test_id": 9,"input": 1,"actual_state": 4,"actual_state_meaning": "S4: Seen '1101' (Pattern Detected)","actual_output": 0,"expected_output": 0,"transition_to": 2,"transition_to_meaning": "S2: Seen '11'","expected_next_state": 2,"expected_next_state_meaning": "S2: Seen '11'","pass": true},{"test_id": 10,"input": 0,"actual_state": 2,"actual_state_meaning": "S2: Seen '11'","actual_output": 0,"expected_output": 0,"transition_to": 3,"transition_to_meaning": "S3: Seen '110'","expected_next_state": 3,"expected_next_state_meaning": "S3: Seen '110'","pass": true},{"test_id": 11,"input": 1,"actual_state": 3,"actual_state_meaning": "S3: Seen '110'","actual_output": 1,"expected_output": 1,"transition_to": 4,"transition_to_meaning": "S4: Seen '1101' (Pattern Detected)","expected_next_state": 4,"expected_next_state_meaning": "S4: Seen '1101' (Pattern Detected)","pass": true},{"test_id": 12,"input": 0,"actual_state": 4,"actual_state_meaning": "S4: Seen '1101' (Pattern Detected)","actual_output": 0,"expected_output": 0,"transition_to": 0,
12345678<testsuites name="results"><testsuite name="all" package="all"><property name="random_seed" value="1775603220" /><testcase name="test_moore_1101" classname="test_moore_1101" file="/mnt/c/Users/npkas/Agentic-RL/rtl_debugger/tasks/task2/test_moore_1101.py" lineno="1" time="0.005320310592651367" sim_time_ns="141.0" ratio_time="26502.21214429756"><failure error_type="AssertionError" error_msg="assert False" /></testcase></testsuite></testsuites>123456<testsuites name="results"><testsuite name="all" package="all"><property name="random_seed" value="1775630338" /><testcase name="test_moore_1101" classname="test_moore_1101" file="/mnt/c/Users/npkas/Agentic-RL/rtl_debugger/tasks/task2/test_moore_1101.py" lineno="1" time="0.01870274543762207" sim_time_ns="141.0" ratio_time="7539.000114730065" /></testsuite></testsuites>
7 unmodified lines89101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555615 unmodified lines727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471487 unmodified lines:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi";S_0x55cb6d4ea4c0 .scope package, "$unit" "$unit" 2 1;.timescale -9 -12;S_0x55cb6d4ea650 .scope module, "moore_ol" "moore_ol" 3 1;.timescale -9 -12;.port_info 0 /INPUT 1 "inp";.port_info 1 /INPUT 1 "clk";.port_info 2 /INPUT 1 "reset";.port_info 3 /OUTPUT 1 "out";P_0x55cb6d512ff0 .param/l "S0" 0 3 10, +C4<00000000000000000000000000000000>;P_0x55cb6d513030 .param/l "S1" 0 3 10, +C4<00000000000000000000000000000001>;P_0x55cb6d513070 .param/l "S2" 0 3 10, +C4<00000000000000000000000000000010>;P_0x55cb6d5130b0 .param/l "S3" 0 3 10, +C4<00000000000000000000000000000011>;P_0x55cb6d5130f0 .param/l "S4" 0 3 10, +C4<00000000000000000000000000000100>;o0x7ff2cddf0018 .functor BUFZ 1, C4<z>; HiZ drivev0x55cb6d513450_0 .net "clk", 0 0, o0x7ff2cddf0018; 0 driverso0x7ff2cddf0048 .functor BUFZ 1, C4<z>; HiZ drivev0x55cb6d539400_0 .net "inp", 0 0, o0x7ff2cddf0048; 0 driversv0x55cb6d5394c0_0 .var "next_state", 2 0;v0x55cb6d5395b0_0 .var "out", 0 0;v0x55cb6d539670_0 .var "present_state", 2 0;o0x7ff2cddf0108 .functor BUFZ 1, C4<z>; HiZ drivev0x55cb6d539750_0 .net "reset", 0 0, o0x7ff2cddf0108; 0 driversE_0x55cb6d523790 .event anyedge, v0x55cb6d539400_0, v0x55cb6d539670_0;E_0x55cb6d5241d0 .event posedge, v0x55cb6d539750_0, v0x55cb6d513450_0;.scope S_0x55cb6d4ea650;T_0 ;%wait E_0x55cb6d5241d0;%load/vec4 v0x55cb6d539750_0;%flag_set/vec4 8;%jmp/0xz T_0.0, 8;%pushi/vec4 0, 0, 3;%assign/vec4 v0x55cb6d539670_0, 0;%jmp T_0.1;T_0.0 ;%load/vec4 v0x55cb6d5394c0_0;%assign/vec4 v0x55cb6d539670_0, 0;T_0.1 ;%jmp T_0;.thread T_0;.scope S_0x55cb6d4ea650;T_1 ;%wait E_0x55cb6d523790;%load/vec4 v0x55cb6d539670_0;%dup/vec4;%pushi/vec4 0, 0, 3;%cmp/u;15 unmodified lines%cmp/u;%jmp/1 T_1.4, 6;%pushi/vec4 0, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;%jmp T_1.6;T_1.0 ;%load/vec4 v0x55cb6d539400_0;%flag_set/vec4 8;%jmp/0xz T_1.7, 8;%pushi/vec4 1, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;%jmp T_1.8;T_1.7 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;T_1.8 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55cb6d5395b0_0, 0, 1;%jmp T_1.6;T_1.1 ;%load/vec4 v0x55cb6d539400_0;%flag_set/vec4 8;%jmp/0xz T_1.9, 8;%pushi/vec4 2, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;%jmp T_1.10;T_1.9 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;T_1.10 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55cb6d5395b0_0, 0, 1;%jmp T_1.6;T_1.2 ;%load/vec4 v0x55cb6d539400_0;%flag_set/vec4 8;%jmp/0xz T_1.11, 8;%pushi/vec4 3, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;%jmp T_1.12;T_1.11 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;T_1.12 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55cb6d5395b0_0, 0, 1;%jmp T_1.6;T_1.3 ;%load/vec4 v0x55cb6d539400_0;%flag_set/vec4 8;%jmp/0xz T_1.13, 8;%pushi/vec4 4, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;%jmp T_1.14;T_1.13 ;%pushi/vec4 2, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;T_1.14 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55cb6d5395b0_0, 0, 1;%jmp T_1.6;T_1.4 ;%load/vec4 v0x55cb6d539400_0;%flag_set/vec4 8;%jmp/0xz T_1.15, 8;%pushi/vec4 2, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;%jmp T_1.16;T_1.15 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55cb6d5394c0_0, 0, 3;T_1.16 ;%pushi/vec4 1, 0, 1;%store/vec4 v0x55cb6d5395b0_0, 0, 1;%jmp T_1.6;T_1.6 ;%pop/vec4 1;7 unmodified lines89101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555615 unmodified lines727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471487 unmodified lines:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2005_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/va_math.vpi";:vpi_module "/usr/lib/x86_64-linux-gnu/ivl/v2009.vpi";S_0x55abb9c154c0 .scope package, "$unit" "$unit" 2 1;.timescale -9 -12;S_0x55abb9c15650 .scope module, "moore_ol" "moore_ol" 3 1;.timescale -9 -12;.port_info 0 /INPUT 1 "inp";.port_info 1 /INPUT 1 "clk";.port_info 2 /INPUT 1 "reset";.port_info 3 /OUTPUT 1 "out";P_0x55abb9c3dff0 .param/l "S0" 0 3 10, +C4<00000000000000000000000000000000>;P_0x55abb9c3e030 .param/l "S1" 0 3 10, +C4<00000000000000000000000000000001>;P_0x55abb9c3e070 .param/l "S2" 0 3 10, +C4<00000000000000000000000000000010>;P_0x55abb9c3e0b0 .param/l "S3" 0 3 10, +C4<00000000000000000000000000000011>;P_0x55abb9c3e0f0 .param/l "S4" 0 3 10, +C4<00000000000000000000000000000100>;o0x7fb2a700a018 .functor BUFZ 1, C4<z>; HiZ drivev0x55abb9c3e450_0 .net "clk", 0 0, o0x7fb2a700a018; 0 driverso0x7fb2a700a048 .functor BUFZ 1, C4<z>; HiZ drivev0x55abb9c64400_0 .net "inp", 0 0, o0x7fb2a700a048; 0 driversv0x55abb9c644c0_0 .var "next_state", 2 0;v0x55abb9c645b0_0 .var "out", 0 0;v0x55abb9c64670_0 .var "present_state", 2 0;o0x7fb2a700a108 .functor BUFZ 1, C4<z>; HiZ drivev0x55abb9c64750_0 .net "reset", 0 0, o0x7fb2a700a108; 0 driversE_0x55abb9c4e790 .event anyedge, v0x55abb9c64400_0, v0x55abb9c64670_0;E_0x55abb9c4f1d0 .event posedge, v0x55abb9c64750_0, v0x55abb9c3e450_0;.scope S_0x55abb9c15650;T_0 ;%wait E_0x55abb9c4f1d0;%load/vec4 v0x55abb9c64750_0;%flag_set/vec4 8;%jmp/0xz T_0.0, 8;%pushi/vec4 0, 0, 3;%assign/vec4 v0x55abb9c64670_0, 0;%jmp T_0.1;T_0.0 ;%load/vec4 v0x55abb9c644c0_0;%assign/vec4 v0x55abb9c64670_0, 0;T_0.1 ;%jmp T_0;.thread T_0;.scope S_0x55abb9c15650;T_1 ;%wait E_0x55abb9c4e790;%load/vec4 v0x55abb9c64670_0;%dup/vec4;%pushi/vec4 0, 0, 3;%cmp/u;15 unmodified lines%cmp/u;%jmp/1 T_1.4, 6;%pushi/vec4 0, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;%jmp T_1.6;T_1.0 ;%load/vec4 v0x55abb9c64400_0;%flag_set/vec4 8;%jmp/0xz T_1.7, 8;%pushi/vec4 1, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;%jmp T_1.8;T_1.7 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;T_1.8 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55abb9c645b0_0, 0, 1;%jmp T_1.6;T_1.1 ;%load/vec4 v0x55abb9c64400_0;%flag_set/vec4 8;%jmp/0xz T_1.9, 8;%pushi/vec4 2, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;%jmp T_1.10;T_1.9 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;T_1.10 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55abb9c645b0_0, 0, 1;%jmp T_1.6;T_1.2 ;%load/vec4 v0x55abb9c64400_0;%flag_set/vec4 8;%jmp/0xz T_1.11, 8;%pushi/vec4 2, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;%jmp T_1.12;T_1.11 ;%pushi/vec4 3, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;T_1.12 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55abb9c645b0_0, 0, 1;%jmp T_1.6;T_1.3 ;%load/vec4 v0x55abb9c64400_0;%flag_set/vec4 8;%jmp/0xz T_1.13, 8;%pushi/vec4 4, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;%jmp T_1.14;T_1.13 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;T_1.14 ;%pushi/vec4 0, 0, 1;%store/vec4 v0x55abb9c645b0_0, 0, 1;%jmp T_1.6;T_1.4 ;%load/vec4 v0x55abb9c64400_0;%flag_set/vec4 8;%jmp/0xz T_1.15, 8;%pushi/vec4 2, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;%jmp T_1.16;T_1.15 ;%pushi/vec4 0, 0, 3;%store/vec4 v0x55abb9c644c0_0, 0, 3;T_1.16 ;%pushi/vec4 1, 0, 1;%store/vec4 v0x55abb9c645b0_0, 0, 1;%jmp T_1.6;T_1.6 ;%pop/vec4 1;
inference.py+121-109
models.py+8
openenv.yaml+9-1
server/app.py+17-1
tasks/task1/design_active.v+5-3
tasks/task1/results.xml+2-2
tasks/task1/sim_build/sim.vvp+10-10
tasks/task2/context.md+6-5
tasks/task2/design_active.v+18-6
tasks/task2/design_buggy.v+15-6
tasks/task2/makefile+2-2
tasks/task2/result.json+83-15
tasks/task2/results.xml+2-2
tasks/task2/sim_build/sim.vvp+50-11
tasks/task2/test_bin_to_gray.pyAdded+80
tasks/task3/design_active.v+37-37
tasks/task3/result.json+46-46
tasks/task3/results.xml+2-4
tasks/task3/sim_build/sim.vvp+51-51