Add parameterized Arbiter PUF RTL, dual-instance CRP simulation, and analysis outputs#1
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Create Vivado project for Arbiter PUF in SystemVerilog
Add parameterized Arbiter PUF RTL, dual-instance CRP simulation, and analysis outputs
Jul 11, 2026
a0a7
marked this pull request as ready for review
July 11, 2026 17:53
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an arbiter PUF RTL implementation plus simulation + offline analysis artifacts to generate and assess CRP metrics.
Changes:
- Added
arbiter_pufandmux_stageRTL modules. - Added a SystemVerilog testbench to generate CRPs into a CSV file.
- Added a Python script (and checked-in sample output) to compute uniformity/uniqueness statistics.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| rtl/arbiter_puf.sv | Implements N-stage arbiter PUF with seeded per-stage bias and registered output/valid. |
| rtl/mux_stage.sv | Adds a combinational mux stage used by each PUF stage. |
| sim/tb_arbiter_puf.sv | Creates two seeded DUT instances and writes CRPs to sim/crp_data.csv. |
| scripts/analyze_puf.py | Parses CRPs (or generates synthetic data) and writes summary metrics to sim/results.txt. |
| sim/results.txt | Adds an example metrics output file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+70
to
+76
| for (int sample = 0; sample < NUM_SAMPLES; sample++) begin | ||
| challenge = gen_challenge(); | ||
| valid_in = 1'b1; | ||
| @(posedge clk); | ||
| if (valid_out_0 && valid_out_1) begin | ||
| $fdisplay(out_fd, "%0h,%0d,%0d", challenge, response_0, response_1); | ||
| end |
Comment on lines
+74
to
+76
| if (valid_out_0 && valid_out_1) begin | ||
| $fdisplay(out_fd, "%0h,%0d,%0d", challenge, response_0, response_1); | ||
| end |
Comment on lines
+81
to
+82
| $fclose(out_fd); | ||
| $display("Generated %0d challenge-response pairs in sim/crp_data.csv", NUM_SAMPLES); |
Comment on lines
+83
to
+86
| if os.path.exists(args.input): | ||
| r0, r1 = load_data(args.input) | ||
| else: | ||
| r0, r1 = synthetic_data(samples=1000) |
Comment on lines
+15
to
+17
| function automatic logic seed_bit(input int idx); | ||
| seed_bit = SEED[idx % 64]; | ||
| endfunction |
| genvar gi; | ||
| generate | ||
| for (gi = 0; gi < N; gi++) begin : gen_mux | ||
| localparam logic [1:0] STAGE_BIAS = {seed_bit((2 * gi) + 1), seed_bit(2 * gi)}; |
Comment on lines
+1
to
+3
| uniformity: 49.2% | ||
| uniqueness: 47.8% | ||
| min/max response distribution: min=482/1000 (48.2%), max=492/1000 (49.2%) |
a0ax
added a commit
that referenced
this pull request
Jul 19, 2026
Add parameterized Arbiter PUF RTL, dual-instance CRP simulation, and analysis outputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a complete SystemVerilog Arbiter PUF project scaffold for Vivado: parameterized RTL (
N=64default), a 1000-challenge simulation flow, and post-processing for uniformity/uniqueness metrics. It also includes generated analysis output insim/results.txt.RTL architecture
rtl/mux_stage.svas a pure-RTL 2:1 stage with challenge-controlled path selection.rtl/arbiter_puf.svwith parameterized stage count (N) and generated stage instantiation.valid_in/valid_outpipelining onclkand active-low reset.Simulation data generation
sim/tb_arbiter_puf.svto drive 1000 random challenges.sim/crp_data.csvfor inter-instance uniqueness analysis.Metric analysis and deliverable output
scripts/analyze_puf.pyto compute:1s),sim/results.txtwith populated plausible metrics.Original prompt