Views
No views yet
| Item | Value |
|---|---|
| Developer | SKLP-EDA-LAB |
| Base model | Qwen/Qwen2.5-Coder-7B-Instruct |
| Task | RTL partial scan selection (PSS) |
| Training stages | Supervised fine-tuning followed by structural- and EDA-aware GRPO |
| Adapter | LoRA, rank 16, alpha 32, dropout 0.05 |
| Release checkpoint | pss_stage2_coverage_from_stage1_8gpu_e1_20260717/checkpoint-175 |
| Input | Complete Verilog RTL and an exact PSS bit budget |
| Output | <think> reasoning and <answer> containing one unique RTL register bit per line |
| Downstream model | TESLA-Pro-TPI |
gen_sync prompt is embedded directly in this model
card. The same content is also provided as files for programmatic loading:examples/gen_sync_messages.json: system/user messages ready for apply_chat_template;examples/gen_sync_prompt.txt: the same prompt in human-readable form;examples/gen_sync.v: the original circuit by itself.gen_sync Prompt1===== SYSTEM =====
2Respond in the following format:
3
4<think>
5...
6</think>
7<answer>
8...
9</answer>
10
11===== USER =====
12You are a DFT engineer specializing in partial scan design. Analyze the RTL code and select register bits as scan cells using budgeted allocation. Track your remaining budget after each selection. Select exactly 1 bits.
13
14Rules:
15- Only select bits from reg variables within their declared width
16- Wire variables cannot be scan cells
17- Select only state-holding variables assigned in edge-triggered clocked always blocks
18- Do not select input ports, clocks, resets, wires, constants, parameters, localparams, integers, genvars, or combinational/next-state temporary signals
19- An output is selectable only when it is a real clocked state-holding variable
20- Copy every selected name exactly from the RTL; never invent, rename, abbreviate, or add/remove suffixes
21- For a vector, select explicit in-range bits such as state[2]; do not output a slice or a whole multi-bit vector name
22- If a candidate is uncertain, skip it and choose another clearly clocked state-holding bit
23- Use format 'RegisterName[bit_index]' for multi-bit registers
24- Use 'RegisterName' for single-bit registers
25- The final answer must be placed in <answer> tags after </think>
26- Answer must contain exactly 1 lines (one register bit per line) in the <answer> section
27
28Place your step-by-step reasoning with budget tracking between <think> and </think>.
29Key requirements:
30- Start with budget: 'I have 1 bits to allocate'
31- Allocation strategy (choose based on the number of bits to select):
32 * For small selections (<=20 bits): Select bits one by one or in very small groups (<=5), stating the running budget after every single addition
33 * For large selections (>20 bits): You may group selections into logical categories (e.g., FSM state bits, counters, synchronizers, data-path registers). For each group, first justify the group, then list the exact bits in that group. After every group, immediately state: 'This group contributes X bits. Current total: N/1, remaining budget: M'. When the remaining budget <=12, switch back to selecting one bit at a time with per-bit justification and running count
34- Track budget after each selection or group: 'Allocate X bits to RegisterName[bit], remaining Y bits' or 'This group contributes X bits. Current total: N/1, remaining budget: M'
35- Focus on BIT-LEVEL selection: Explain why specific bits (e.g., Volume[3]) were chosen, not just register names
36- Do NOT enumerate all registers upfront. Mention registers only as you allocate them
37- Never repeat allocations. If repeating patterns appear, STOP and verify budget
38- If budget becomes negative, you must immediately stop and re-select fewer bits. Do NOT continue repeating the same selection
39- Verify at the end: 'Total = 1 bits; budget = 0'
40- Before writing <answer>, extract exactly 1 register bits from your reasoning that match your budget tracking. The <answer> section must contain exactly 1 lines, one register bit per line.
41
42#QUESTION#: Which 1 register bits were selected as the most suitable scan cells?
43#RTL CODE#:
44module gen_sync ( input clock,input reset,input enable,input [7:0] rate,output wire sync );
45
46 reg [7:0] counter;
47 assign sync = |(((rate+1)>>1)& counter);
48 always @(posedge clock)
49 if(reset || ~enable)
50 counter <= #1 0;
51 else if(counter == rate)
52 counter <= #1 0;
53 else
54 counter <= #1 counter + 8'd1;
55 endmodule#RTL CODE# with the complete target RTL.1<think>
2step-by-step register legality and budget reasoning
3</think>
4<answer>
5one exact register bit per line
6</answer>1module gen_sync ( input clock,input reset,input enable,input [7:0] rate,output wire sync );
2
3 reg [7:0] counter;
4 assign sync = |(((rate+1)>>1)& counter);
5 always @(posedge clock)
6 if(reset || ~enable)
7 counter <= #1 0;
8 else if(counter == rate)
9 counter <= #1 0;
10 else
11 counter <= #1 counter + 8'd1;
12 endmoduleexamples/gen_sync_messages.json, rather than wrapping this RTL in an unrelated generic coding prompt.pip install "transformers>=4.37" peft accelerate huggingface_hub1import json
2import torch
3from huggingface_hub import hf_hub_download
4from peft import AutoPeftModelForCausalLM
5from transformers import AutoTokenizer
6
7model_id = "SKLP-EDA-LAB/Tesla-Pro-PSS"
8
9tokenizer = AutoTokenizer.from_pretrained(model_id)
10model = AutoPeftModelForCausalLM.from_pretrained(
11 model_id,
12 torch_dtype="auto",
13 device_map="auto",
14)
15model.eval()
16
17messages_path = hf_hub_download(
18 repo_id=model_id,
19 filename="examples/gen_sync_messages.json",
20)
21with open(messages_path, encoding="utf-8") as f:
22 messages = json.load(f)
23
24text = tokenizer.apply_chat_template(
25 messages,
26 tokenize=False,
27 add_generation_prompt=True,
28)
29inputs = tokenizer(text, return_tensors="pt").to(model.device)
30
31with torch.inference_mode():
32 generated = model.generate(
33 **inputs,
34 max_new_tokens=2048,
35 do_sample=True,
36 temperature=0.7,
37 top_p=0.95,
38 )
39
40new_tokens = generated[:, inputs.input_ids.shape[1]:]
41print(tokenizer.decode(new_tokens[0], skip_special_tokens=True))| Model | P@5 (%) | Best in TC Imp. (%) | Best in PC (%) | Best in DAT (%) |
|---|---|---|---|---|
| TESLA-Pro-PSS | 95.3 | 70.7 | 68.3 | 76.1 |
| TESLA (SFT + DPO) | 94.3 | 69.2 | 66.9 | 75.8 |
| Qwen2.5-Coder-7B | 11.7 | 4.1 | 9.4 | 9.8 |
TC Imp. is test-coverage improvement, PC is ATPG pattern count, and DAT is data arrival time. These results depend on the paper's prompt, output parser, synthesis libraries, constraints, and ATPG setup.gen_sync example bundled here:5e-6;8;G=7, KL coefficient beta=0.02, clipping range epsilon=0.2;<answer> rather than counting text lines heuristically;1@misc{chao2026teslapro,
2 title = {TESLA-Pro: Testability Enhancement for Shift Left Automation via GRPO-aligned LLMs},
3 author = {Zhiteng Chao and Jingjie Xia and Rengang Zhang and Feng Gu and Hongqin Lyu and Bin Sun and Wenxing Li and Jianan Mu and Zizhen Liu and Jing Ye and Xiaowei Li and Huawei Li},
4 year = {2026},
5 note = {Manuscript}
6}