con un clic
verilog-rra
Build and verify Round Robin Arbiter testbenches using Icarus Verilog.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Build and verify Round Robin Arbiter testbenches using Icarus Verilog.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Execute commands and manage files in a Foundry sandbox.
Handle Foundry task settlement records and payment metadata.
Verilog-2001 coding style guidelines and best practices for synthesizable RTL.
Browse the IP portfolio with reference implementations of common digital modules.
View and manage durable user memory notes.
Summarize recent work, memory, and task progress.
| name | verilog_rra |
| description | Build and verify Round Robin Arbiter testbenches using Icarus Verilog. |
| slash_command | {"cmd":"/verilog_rra","label":"Verilog RRA","desc":"Write, compile, and simulate a Round Robin Arbiter testbench with iverilog."} |
Use this skill when the user asks to build, verify, or test a Round Robin Arbiter (RRA) in Verilog, or when a Foundry requirement mentions RRA/verilog.
iverilog and simulate using vvpUse a mask-based approach for fair round-robin scheduling:
x & (~x + 1)// Round Robin Arbiter - 4 bit (Verilog-2001)
module rra (
input wire clk,
input wire rst_n,
input wire [3:0] req,
output reg [3:0] grant
);
reg [3:0] mask;
reg [3:0] masked_req;
reg [3:0] sel;
function [3:0] lsb;
input [3:0] x;
begin
lsb = x & (~x + 4'b0001);
end
endfunction
always @(posedge clk or negedge rst_n) begin
if (!rst_n) begin
mask <= 4'b1111;
grant <= 4'b0000;
end else if (|req) begin
masked_req = req & mask;
if (|masked_req)
sel = lsb(masked_req);
else
sel = lsb(req);
grant <= sel;
case (sel)
4'b0001: mask <= 4'b1110;
4'b0010: mask <= 4'b1100;
4'b0100: mask <= 4'b1000;
default: mask <= 4'b1111;
endcase
end else begin
grant <= 4'b0000;
end
end
endmodule
$dumpfile / $dumpvars for waveform captureALL_TESTS_PASSED or SOME_TESTS_FAILED# Compile
iverilog -o rra_sim rra.v rra_tb.v
# Simulate
vvp rra_sim
# View waveforms (if GTKWave available)
gtkwave rra_tb.vcd
iverilog and vvp installedALL_TESTS_PASSED appears in simulation output