{"number": "ADA-001630", "content": "# I2C Master Sequencer\n\nThe module is an I2C master transaction engine that turns queued FIFO bytes and a transfer descriptor into an I2C bus sequence.\n\n- The engine may begin a transfer only when the bus is idle and the transmit FIFO holds at least one entry.\n- A transaction starts with a start condition and then transmits the addressed byte and each queued byte in order.\n- Every transmitted byte must be acknowledged by the target; a missing acknowledge aborts the transaction, issues a stop condition, and reports the failure.\n- The transfer descriptor selects a restart or a stop ending and whether the operation reads from or writes to the target.\n- After a stop or abort, the engine returns to the idle state and resumes monitoring the bus.\n- While idle, or while the transmit FIFO is empty, outputs hold their inactive values.\n- Losing bus arbitration or a flush request returns the engine to idle without completing the transaction.\n- The reset input is asynchronous and active low."} {"number": "ADA-001646", "content": "# I2C Master Transmit Shifter\n\nSerializes a transmit byte onto the I2C serial data line while driving the serial clock line through the master's high and low timing phases. The eight data bits are sent most-significant first, followed by an acknowledge bit slot in which the data line is released for the target, with an acknowledge-check indication asserted for that slot and a data-phase indication distinguishing the data bits from the acknowledge slot; a shift-done pulse marks byte completion. Clock stretching is honored by extending the high phase while the clock line is held low externally. The byte to send is taken from the loaded transmit-FIFO word according to whether a data byte or a 7-bit address is being sent, and a completed transfer can be held until the controller permits continuation. Reset is active-low."} {"number": "ADA-012493", "content": "Arbiter that shares one output port among three clients: an instruction cache, a data cache, and a memory unit.\nWhen the output port is ready, a pending instruction-cache request has absolute priority; otherwise the two remaining clients take turns, with the alternating priority remembered across arbitration rounds.\nThe selected client is acknowledged, a corresponding select code is presented, and the acknowledgement to the output port is asserted.\nThe chosen client keeps ownership while the port remains ready and releases it when its control input signals completion, after which arbitration resumes.\nSelection state changes on the rising clock edge, and a synchronous active-high reset returns the arbiter to idle with the alternating priority reset."} {"number": "ADA-018956", "content": "32-bit shifter stage for an ARM-style datapath.\n- The two-bit function selects logical shift left, logical shift right, arithmetic shift right or rotate right.\n- The shift distance is a two-bit stage value; a separate immediate-zero flag selects the special zero-encoding cases: no shift for the left-shift function, full-width shift for the right-shift functions, and rotate-right-through-carry for the rotate function.\n- The result is returned together with the carry produced by the operation.\n- Left shifts insert zeroes and carry out the last bit shifted out; logical right shifts insert zeroes; arithmetic right shifts replicate the sign bit.\n- Rotation refills the vacated high bits from the bits shifted out, and the rotate-through-carry form shifts right while inserting the incoming carry at the top."} {"number": "ADA-023278", "content": "# DDR Command Look-Ahead Cache\n\nThe module maintains the per-slot command status used by the memory controller's look-ahead logic.\n\n- Chip-level status for all chip selects, covering closed banks, precharge/refresh/self-refresh/power-down capability and requests, passes through unchanged.\n- On a fetch, the look-ahead command status advances by one slot and the newly exposed slot is marked invalid.\n- Fetch and ECC fetch-error events govern the validity of the current command-status word.\n- Between fetches the command status is forwarded unchanged.\n- Look-ahead depth is parameterized, and an active-low asynchronous reset clears the cached status."} {"number": "ADA-026641", "content": "# Reversi Disc-Move Engine\n\nApplies a disc placement to a Reversi/Othello board given as two 64-bit disc maps, the placement coordinates, and the moving colour. From the placed position it scans the row in both directions and flips every opponent disc in a continuous run terminated by a disc of the moving colour; runs without such a bracket are left unchanged. Updated disc maps for the moving player and the opponent are produced. Reset is synchronous and active-high and loads the scan from the supplied board and coordinates."} {"number": "ADA-026676", "content": "A 32-bit divider with signed and unsigned modes.\n\n- A division request produces a quotient and a remainder, marked valid by a ready pulse.\n- The sign input selects unsigned division or two's-complement signed division; signed results truncate toward zero and the remainder takes the dividend's sign.\n- Division by zero returns an all-ones quotient with the dividend as the remainder.\n- Reset is active low and synchronous.\n"} {"number": "ADA-029555", "content": "# Write-back direct-mapped cache\n\nCaches 32-bit processor accesses in eight direct-mapped lines of four words each and transfers whole lines to and from a 128-bit memory.\n\n- A processor access is split into a line tag, a line index and a word offset within the line.\n- A read that hits returns the requested word without stalling; a read miss stalls the processor while the line is fetched and then returns the requested word.\n- A write that hits updates the word within the line and marks the line dirty without stalling.\n- A write miss fetches the line first, merges the written word and installs the line.\n- A replaced dirty line is written back to memory; a fetched line is installed with its tag, marked dirty after a write miss and clean after a read miss.\n- The processor is stalled while a miss is outstanding, and the memory side uses a request/ready handshake for full-line reads and writes.\n- Reset is asynchronous and active high.\n"} {"number": "ADA-034151", "content": "# AHB Slave Register File\n\nA simple AHB-style slave with four 32-bit read/write registers and a read-only identification area.\n\n- Writes update the four data registers with per-byte strobes.\n- Reads return the data registers, peripheral and component identification values, or zero for unmapped addresses.\n- The identification area includes a revision field supplied by an input.\n- `hresetn` is active-low asynchronous reset; all data registers clear on reset."} {"number": "ADA-034520", "content": "# Multi-Cycle MIPS Control Unit\n\nSequences a multi-cycle MIPS datapath one instruction at a time through fetch, decode, execute, memory, and writeback, generating the control signals for each phase; the instruction memory is permanently read-enabled.\n\n- Supported operations: register and immediate arithmetic, logical, shift, and set-less-than operations, plus LUI and CLZ; byte, halfword, and word loads and stores with signed or unsigned extension.\n- Control transfer: equality, inequality, and sign-conditioned branches, TEQ, and direct or register jumps with optional link to the return address.\n- Multiply and divide use external units and keep the execute phase active while the corresponding busy input is asserted.\n- HI/LO register moves and coprocessor-0 register moves are supported.\n- Exceptions are raised for system call, breakpoint, and TEQ, with cause reporting and exception return.\n- `finish` marks completion of an instruction; active-high asynchronous reset returns the unit to its initial phase.\n"} {"number": "ADA-038814", "content": "# Accumulator-Machine Control Unit\nMulticycle control unit for a simple accumulator-based processor with program ROM and data RAM. Each instruction is first fetched from ROM while the program counter advances, then its operand phases execute according to the instruction: load an immediate from ROM, load through an address fetched from the program (from ROM or RAM), store the accumulator to RAM, or an arithmetic sequence that reads the register with the accumulator enabled. A halt instruction stops all activity until reset.\nThe unit drives the program counter, register read/write, accumulator enable, RAM and ROM enables and read/write strobes, and address select, and reports the current fetch phase.\nReset is asynchronous and active low."} {"number": "ADA-040244", "content": "The module is the host CPU interface of a video controller, implementing an index-addressed register file with palette access and status readback.\nIt provides a byte-wide write and read path selected by a register-select input; writes update a palette address and data registers, a pixel mask, an index address/data/control register set, and numerous video control registers.\nReads return the register selected by the register-select and current index value, the video status flags when their addresses are selected, and otherwise the byte supplied by the external cursor interface.\nThe palette data registers form a three-deep write pipeline, and palette readback returns either the palette address or the read/write mode according to the palette format bit.\nThe index address auto-increments on an indexed data access when increment mode is enabled, and the index low and high registers expose the index value.\nAn active-low asynchronous reset initializes all control registers to their defined default values."} {"number": "ADA-041828", "content": "The module is the control sequencer for a convolution layer.\nIt cycles through an initialization phase, a weight-preload phase, a shift phase, and a load phase, issuing command indications to the input interface and waiting for the corresponding acknowledgement.\nThe shift phase repeats for a fixed number of weight groups and a fixed number of shift positions; completing all shift positions returns the sequencer to preload, while completing a weight group moves it to the load phase before shifting resumes.\nThe command output requests preload, shift, or load according to the phase being entered.\nThe enable input gates only the phase advancement; iteration counting and command generation continue to follow the acknowledgement input while the phase is held.\nThe reset input is asynchronous and active low."} {"number": "ADA-042747", "content": "# Microcode Control Store\n\nCombinational microcode store mapping an 8-bit microaddress to a 24-bit microword. Each microword carries the ALU control fields (function select, carry-in, destination select, and the two operand-source selects), a branch/operation field, a count-control bit, and the next microaddress.\n\nThe contents are fixed; addresses without an entry return a default microword. The module has no clock or reset."} {"number": "ADA-045836", "content": "# Overview\nCombinational control decoder for a MIPS-style single-cycle processor, covering register-register ALU operations, load, store, branch-on-equal and jump instructions.\n\n# Behaviour\n- Register-register operations write the third register field from the ALU result and take the register operand as the second ALU input.\n- Loads form an address by addition, read memory and write the fetched word to the second register field; stores write memory and update no register.\n- Branch-on-equal compares the two register operands and requests a branch when they are equal; jump selects an absolute target.\n- Any other opcode leaves every control inactive.\n"} {"number": "ADA-047488", "content": "# D Flip-Flop with Complementary Outputs\n\n- Edge-triggered single-bit register with true and inverted outputs.\n- On each active clock edge the true output takes the data input value and the inverted output takes its complement.\n- An active-high asynchronous reset clears the true output and sets the inverted output."} {"number": "ADA-047536", "content": "# Loadable D Flip-Flop\n\nA single-bit flip-flop clocked on the rising edge, with a synchronous clear and a load enable.\n\n- When clear is asserted, the output is cleared on the next clock edge regardless of the other inputs.\n- Otherwise, a load assertion captures the input; with no load the output holds its value."} {"number": "ADA-056166", "content": "# Huffman Buffer Byte Fetch Unit\n\nThe module extracts one byte from a Huffman-coded input buffer as part of a decoding pipeline and reports the fetched byte together with an updated read offset.\n\nBuffer reads use an address formed from the current offset plus a base offset input; the byte at the current offset and the byte that follows it are examined.\n\nWhen the examined sequence contains the escape prefix followed by a nonzero byte, the returned byte is the escape prefix; otherwise the returned byte follows the current buffer byte.\n\nThe offset advances by one position for an ordinary byte and by two positions when an escape prefix is consumed, and the updated offset is accompanied by a valid indication.\n\nThe module provides a start/done/idle/ready handshake and a clock enable, and it may be restarted for each fetch.\n\nReset is synchronous and active high."} {"number": "ADA-068786", "content": "# Byte buffer with padding intervals and reverse-order delivery\n\n- Captures a contiguous run of input bytes while the data-valid input is high, shifting each new byte into a 160-bit buffer; the buffer holds up to 20 bytes by default.\n- When the input run ends the unit waits a left-padding interval of 80 clock cycles before delivering data.\n- Delivery then presents one stored byte every eight clock cycles, newest first, removing each byte as it is presented, until the oldest stored byte has been sent.\n- After the last byte it observes a right-padding interval of 16 clock cycles and then returns to waiting for a new run.\n- The parallel output shows the byte currently at the head of the buffer, or zero when no data is stored.\n- The indicator output pulses for one cycle when the input run ends and for one cycle when the last stored byte is delivered.\n- Reset is asynchronous and active low and clears the state, the buffer and the pointers."} {"number": "ADA-077459", "content": "A GPIO and configuration register block for a GPU board. It captures start and coin buttons, two six-button joysticks, the board end-of-frame indication, and two DIP switch banks, and makes them readable through a one-hot register-select read port.\n\nA status register is derived from a configuration byte written through the write port. A second write path requires a three-byte unlock sequence before accepting a configuration word; that word either updates the scaling and horizontal/vertical scan-line options or programs the PROM write enables, which are exposed as outputs. Reset is active high."} {"number": "ADA-079293", "content": "# Housekeeping SPI Slave\n\nThe module shall implement an SPI slave interface for accessing an internal register space.\n\nFalling and rising edges of the serial clock shall sample the input data and drive the output data; the chip-select input shall frame each transaction and asynchronously reset the interface.\n\nThe first byte of a transaction shall be a command specifying write or read direction, the auto-increment mode, and an optional pass-through request; the following byte shall be the register address, and subsequent bytes shall be write data or read data.\n\nIn write mode the module shall issue a write strobe when a data byte has been received; in read mode it shall load the addressed data and shift it out while driving the output enable, and it shall issue a read strobe for each read access.\n\nThe address shall increment between consecutive data bytes according to the auto-increment mode, and a pass-through request shall be reported on the pass-through outputs.\n\nThe module shall expose the address, read and write strobes, and the read data path, and reset shall return it to the command state."} {"number": "ADA-096975", "content": "# MASH Delta-Sigma Modulator\n\nThe module converts a wide digital input into a narrow output sequence whose average tracks the input value.\n\n- Noise shaping of the configured order pushes quantization error toward high frequencies.\n- Input and modulus widths are set by the WIDTH_MODULUS parameter, and the sequence width by ORDER.\n- The output sequence advances with the clock.\n- An asynchronous active-high reset clears the modulator."} {"number": "ADA-097047", "content": "# Simple Dual-Port RAM\n\nA 512-entry, 52-bit memory with independent write and read ports sharing one clock.\n\n- A write-enabled cycle stores the input data at the write address.\n- A read-enabled cycle presents the addressed data on the output on the following clock.\n- There is no reset; contents are undefined until written."} {"number": "ADA-114255", "content": "# I2C Master\n\nBit-banged I2C master with programmable bus timing, start/stop control, and 8-bit transmit and receive operations.\n\n- The bus bit period is set by the combined high and low timing values; the clock line rests high when idle.\n- The data line is open-drain: driven low to transmit a zero, released for a one, and its level is always observable.\n- Start and stop requests are recognized at bit-clock boundaries and mark the bus busy; the bus is released when neither transmit nor receive is active.\n- A transmit operation sends the eight transmit-register bits most-significant bit first, then captures the slave acknowledge.\n- A receive operation gathers eight serial bits into the receive register and drives the acknowledge slot that follows.\n- Completion of an operation is reported by the busy indication clearing.\n- Reset is asynchronous and active low, releasing the data line and leaving the clock line high."} {"number": "ADA-116936", "content": "# RISC-V M-Extension Multiplier\n\nMultiplies two 64-bit operands under the selected operation: low product, signed high product, unsigned high product, signed-by-unsigned high product, or the low 32-bit product sign-extended to 64 bits.\n\nA completed product is reported four clock periods after operands are accepted. In fake-generation mode the operands are not processed and a separate fake-valid indication is issued instead.\n\nActive-low asynchronous reset clears the valid indications."} {"number": "ADA-117112", "content": "# Parallel Class Multiply-Accumulator\n\n- Computes a signed dot product for each of several classes over a sequence of input samples.\n- Each accepted sample supplies one signed scalar value together with a signed weight and bias for every class; the two input streams are consumed in lockstep under valid/ready handshaking.\n- The sample is multiplied by each class weight and accumulated into that class's running sum; at the end of the sequence the class bias is added and all class results are presented together on the output word.\n- An output word is valid only at the completion of an input sequence, which is also flagged on the end-of-sequence output.\n- A partial accumulation is discarded if the input sequence stalls beyond a fixed timeout."} {"number": "ADA-130565", "content": "Host-side PS/2 mouse interface: it initializes the mouse after reset, receives motion packets, and presents button and movement data through a read handshake.\n\n- The PS/2 clock is debounced before its edges are used, data is captured on clock falling edges, and a watchdog aborts a stalled transfer.\n- After reset the interface holds the PS/2 clock low to inhibit device transmission and sends a host-to-device command frame with start, data, odd-parity and stop bits.\n- If the device does not acknowledge the command within the expected response window, a no-acknowledge error is reported and remains asserted.\n- An incoming packet consists of three device frames, each with a start bit, eight data bits least-significant first, an odd-parity bit and a stop bit; a packet is accepted only when all start and stop bits and the parity of every frame are correct.\n- A correctly received packet provides the left and right button states and signed X/Y motion increments, each coded as a sign bit plus magnitude.\n- Acceptance of a packet raises the data-ready indication, which stays asserted until the host asserts read.\n- Only valid packets update the button and motion outputs."} {"number": "ADA-140499", "content": "# Clip Lookup ROM\n\nA combinational lookup table mapping a 9-bit address to a 5-bit clip value; addresses not listed read as zero.\n\n| Address high bits | Low-bit range | Values in ascending address order |\n|---|---|---|\n| 1 | 23-51 | ten 1s, four 2s, three 3s, three 4s, 5, two 6s, 7, 8, 9, 10, 11, 13 |\n| 2 | 21-51 | ten 1s, four 2s, three 3s, two 4s, two 5s, 6, 7, two 8s, 10, 11, 12, 13, 15, 17 |\n| 3 | 17-51 | ten 1s, four 2s, three 3s, three 4s, 5, two 6s, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 23, 25 |"} {"number": "ADA-148083", "content": "# Shared Graphics SRAM Controller\n\nShares one synchronous SRAM among graphics clients: address loading, word read, word write, direction read, write-back, shaded-data fetch, texel fetch and framebuffer scanline readout.\n\n- Requests are served one at a time; when several are pending, the order is: address load, read, write, direction, write-back, shaded data, texel, framebuffer continuation, next-scanline trigger.\n- A loaded address is used by subsequent reads and writes and advances after each completed read or write.\n- Write-back writes a supplied word to a supplied address and acknowledges completion.\n- Shaded data is fetched from a triangle-indexed memory region and returned with a ready strobe; texel data is fetched from a supplied texel address with its own ready strobe.\n- Framebuffer readout streams the words of one scanline for the selected page, asserting data-valid with each word; a next-scanline trigger restarts the burst at the beginning of the next line.\n- Read data is returned as a 64-bit word, and the latched read word also supplies a 48-bit record and a 15-bit embedded address field."} {"number": "ADA-148787", "content": "# 16-Bit Address-Selected ROM\n\n## Function\nReturns a 16-bit word for a 14-bit address from a fixed initialized table.\n\n## Requirements\n- The stored table covers addresses zero through 249; all other addresses return zero.\n- A read is captured on the rising clock edge from the current address.\n- The data output presents the captured word only while enable is high, and is zero otherwise.\n- There is no reset; the table contents are fixed at initialization."} {"number": "ADA-148887", "content": "Serial-interface control ROM addressed by a six-bit step index, with registered control outputs: a load strobe, a shift strobe, a serial clock, an active-low output enable and a latch enable.\n\nThe programmed sequence performs a load, a burst of shift and clock pulses, and a final latch to transfer a word serially. Reset is asynchronous and active-low and returns the controls to an idle pattern."} {"number": "ADA-150776", "content": "Packet receiver for a flit-based interconnect.\n- The first flit of a packet selects the protocol variant and the command: read request, write request or read response.\n- A read request emits the address, command, length and, for the extended variant, the feature fields, then returns to idle.\n- A write request emits the address, command and optional feature fields from the header, and the following body flits are delivered as write data.\n- A read response emits its first data word from the header and then delivers the remaining body flits as data.\n- The number of body beats is encoded in the length field, each increment doubling the transfer size.\n- Data and address transfers carry their own valid indications, and the receive side is asked to supply the next flit whenever more flits are needed.\n- The active-low reset returns the receiver to idle."} {"number": "ADA-160969", "content": "# Configurable SPI Master with Clock Divider\n\nThe module performs full-duplex 8-bit SPI transfers as a master, with configurable clock polarity, phase, and divider.\n\n- Asserting enable starts a transfer with chip select asserted; the transmit byte is sent most-significant bit first and the received byte is presented when transfer completes.\n- Completion of a received byte is reported for one cycle.\n- While enable remains asserted after a byte completes, the next transmit byte starts immediately without releasing chip select; deasserting enable ends the transfer and releases chip select.\n- The serial clock idles at the selected polarity and is produced by dividing the input clock by the configured divisor.\n- The clock phase determines on which serial clock edge transmit data changes and on which edge receive data is captured.\n- Reset is asynchronous and active low."} {"number": "ADA-164813", "content": "# SHA-512 Compression Core\n\nComputes the SHA-512 compression function over one 1024-bit message block.\n\n- A start pulse loads the message block and the incoming 512-bit chaining value (eight 64-bit working words) and begins the 80-round computation using the standard SHA-512 round constants and message schedule.\n- On completion the updated chaining value is presented with a done indication.\n- The result can be fed back as the incoming chaining value to chain successive blocks; a new block is accepted only after completion.\n- Reset is synchronous and active high."} {"number": "ADA-168597", "content": "# SPI Command Parser\n\nThe module decodes an 8-bit SPI command into the transfer controls used by an SPI slave.\n\n- Read and write commands for a selected register group are decoded, and the selected group is reported for the transfer.\n- Register accesses enable the register block and require no address phase.\n- Block-read and block-write commands request an address phase, enable continuous transfer mode, and either fetch received data or send data.\n- The block-write command additionally inserts a dummy wait phase before data.\n- Commands outside the supported set raise the error indication and leave all transfer controls inactive.\n- Decoding is purely combinational."} {"number": "ADA-175609", "content": "# Guitar Tuner Tone Generator\n\nGenerates square-wave reference tones for four guitar strings. Each string has its own enable input, and a shared one-hot fret selection chooses the stopped pitch for the enabled strings; an all-zero selection gives the open-string pitch.\n\nWhile a string is enabled, its square wave toggles at the selected note frequency; disabled strings are silent. The speaker output mixes the enabled string waveforms together. Synchronous active-high reset silences the outputs."} {"number": "ADA-180239", "content": "# TLB Hit and Attribute Selector\n\nConsolidates per-entry TLB match results into a single hit indication and the matching entry's attributes.\n\n- From the per-entry match signals it derives valid, dirty, cacheability, privilege, physical-frame-number and page-size outputs, selecting the attributes from the even or odd attribute array according to the entry's odd indication.\n- An entry's odd indication is taken from the 4 KB odd input when its page size is 4 KB, and from the 2 MB odd input otherwise.\n- Two independent lookups are supported, each with its own hit and attribute outputs over the shared page-size table."} {"number": "ADA-182619", "content": "# USB-to-UART Endpoint Bridge\n\nBridge between a USB device endpoint pair and a UART. On the out-endpoint path, data received from the host is streamed to the UART transmitter: the endpoint is requested while data is available, bytes are fetched with the endpoint handshake, and delivery follows the UART valid/ready flow control, a byte being held until the transmitter accepts it. On the in-endpoint path, bytes arriving from the UART receiver are forwarded to the USB in endpoint with the endpoint grant and free-buffer handshake, and the USB transfer completion is signalled after the UART receive stream has stayed idle for a short timeout. Endpoint stall is never signalled. Reset is active-high and synchronous."} {"number": "ADA-186831", "content": "Parameterized AXI-Stream FIFO (word width and depth configurable) providing in-order buffering between a source and a sink.\n\nAccepted source data is presented to the sink in acceptance order, qualified by a valid indication. The source handshake is accepted whenever the FIFO has room or the sink is simultaneously consuming; it is refused only when the FIFO is full and the sink is not consuming. Reset is active-low and synchronous, clearing the stored contents and the occupancy indication.\n"} {"number": "ADA-196989", "content": "# Multiplier Datapath Slice (Multi-Cycle)\n\nA single step of a multi-cycle multiplier datapath used together with an external adder. It presents the adder operands and control (including a subtract request for the final signed correction and a carry-enable that is dropped in carryless mode), accepts the adder result, and returns the updated 64-bit accumulator and the next multiplicand value.\n\nThe multiply width is selected among 2, 4, 8, 16 and 32 bits, and completion is reported when the step count equals the selected width. Both two's-complement signed multiplication with sign extension and carryless (GF(2) polynomial) multiplication are supported.\n\nInterface: `rs1`, `rs2`, `count`, `acc`, `arg_0`, `carryless`, `pw_32`, `pw_16`, `pw_8`, `pw_4`, `pw_2`, `lhs_sign`, `rhs_sign`; adder side `padd_lhs`, `padd_rhs`, `padd_sub`, `padd_cin`, `padd_cen`, `padd_cout`, `padd_result`; results `n_acc`, `n_arg_0`, `ready`."} {"number": "AutoVCoder-FR-037067", "content": "# 5-to-32 Write-Enable Decoder\n\n- Decodes a 5-bit address into a one-hot 32-bit write enable.\n- The enable input qualifies the output; when it is deasserted, all write enables are zero.\n- The output is combinational; no clock or reset is required."} {"number": "AutoVCoder-FR-083747", "content": "# Burst Memory Read Engine\n\nA burst read engine that copies a region of memory into a FIFO. On a start request it records the start address and transfer length and begins issuing read requests in bursts of a fixed length; each accepted read-data word is written into the FIFO with a write request. Bursts continue, advancing the read address, until the region is exhausted, after which the engine returns to idle. New bursts are held off while the FIFO is almost full or a downstream wait request is asserted. The burst length is a parameter. Reset is active-low."} {"number": "AutoVCoder-FR-086777", "content": "The module shall implement the branch and return control of a program sequencer. It shall recognize conditional jumps on the zero and overflow condition flags, unconditional jumps, and return instructions from the operation code, and shall select a redirected program-counter value whenever a jump is taken. A conditional jump shall be taken according to its associated condition flag, and after a return the condition flags saved when the interrupt was accepted shall again be used for condition evaluation. On an interrupt request the sequencer shall save the address to resume and redirect execution to the interrupt-vector address, and a return instruction shall resume from the saved address. Synchronous active-low reset shall clear the saved address, the saved flags, and the interrupt capture state."} {"number": "AutoVCoder-FR-100400", "content": "# Ethernet Frame Timestamp Inserter\n\nPass-through GMII frame processor that rewrites a timestamp in matching frames. Received frames are forwarded with one clock of delay together with the registered data-valid and error indications, and every frame is counted.\n\nAfter the start-of-frame delimiter it checks a six-byte header signature. In a matching frame the low three bits of the message-type byte are incremented by one, and the 16-bit local-time value captured at the start of the frame replaces two bytes at a position selected by the message type: message-type value 0 and value 1 each select a different insertion point. Frames that fail the signature check pass through unmodified.\n\nAn active-low asynchronous reset clears the outputs and the packet count."} {"number": "AutoVCoder-FR-116054", "content": "# Nibble-Stream Sync Detector\n\nDetector that watches a four-bit input stream for the sixteen-bit synchronization pattern 0x55D5 and captures the two bytes that follow it.\n\nValid input nibbles are shifted into a history register whose last four nibbles are compared with the pattern. Once the pattern is recognized, the history is frozen for the next four valid nibbles, during which the received nibbles are assembled into two bytes on the eight-bit data output and a one-clock valid pulse marks each completed byte. The capture window then closes and pattern recognition resumes.\n\nThe data output shifts on every valid nibble regardless of recognition, so it always holds the two most recently received nibbles.\n\nReset is asynchronous and active low."} {"number": "AutoVCoder-FR-123000", "content": "A binary decoder shall assert exactly one of its output lines, selected by the value on the binary input, whenever the enable input is asserted. All outputs shall be low when the decoder is disabled. Each input code shall select a unique output line."} {"number": "AutoVCoder-FR-126839", "content": "# Asynchronous FIFO\n\nDual-clock FIFO buffering 68-bit entries between an input clock domain and an output clock domain.\n\n- A push stores an entry at the write pointer in the input domain and a pop advances the read pointer in the output domain; the full and empty flags indicate when those operations must be withheld.\n- The head entry is presented on the output while the FIFO is non-empty. The output's most significant bit reports the non-empty state, while the input's most significant bit is not stored.\n- Full and empty indications are synchronized across the two clock domains, so their updates are delayed by the synchronization latency.\n- Reset is asynchronous, active-high, and clears both domains.\n\nThe depth is parameterised."} {"number": "AutoVCoder-SR-04992", "content": "# Two-Stage Increment-and-Double Pipeline\n\nThe module transforms a stream of small input words into an output stream in which each output word equals twice the value of its corresponding input word plus one. Results appear two clock periods after their input, preserving stream order.\n\nThe datapath is four bits wide; arithmetic wraps modulo the word size rather than saturating. An active-high asynchronous reset clears the pipeline and drives the output to all zeros.\n"} {"number": "AutoVCoder-SR-06647", "content": "# 32-bit ALU\n\nComputes a combinational 32-bit result from two operand words under a three-bit operation select.\n\n- Supported operations are addition, subtraction, bitwise AND, bitwise OR and bitwise XOR.\n- The zero flag is asserted whenever the result is zero.\n- The unit is purely combinational; there is no clock or reset."} {"number": "AutoVCoder-SR-07473", "content": "# ARQ Data Receiver\n\nAccepts an 8-bit data word together with an error indication. When the received word is error-free it is presented on the output one clock later with the acknowledgement asserted; when the word is flagged in error no acknowledgement is asserted and the output is not updated.\n\nReset is asynchronous and active high."} {"number": "AutoVCoder-SR-11647", "content": "# One-Entry ARQ Retransmission Buffer\n\nA one-entry ARQ buffer for a byte-oriented link. The most recently received data byte is held, and the acknowledgement input reports whether the transfer succeeded. On acknowledgement, the held byte is delivered on the data output and the resend request is cleared; if the transfer is not acknowledged, the resend request is asserted while the data output retains its value.\n\n`reset` is an asynchronous active-high reset that clears the data output and the resend request."} {"number": "AutoVCoder-SR-16228", "content": "# Second-Order IIR Filter\n\nTwo-pole, two-zero fixed-point IIR filter. Each clock forms the next output from the current input sample and the previous input sample, weighted by two feed-forward coefficients, plus the two previous output samples weighted by two feedback coefficients; the sum is scaled back to the output range by a fixed right shift. Filter coefficients are signed parameters.\n\nThe output is registered and its two-sample history is maintained for the recursion. Asynchronous active-high reset clears the output and both history registers to zero."} {"number": "ChipBench-VG-004", "content": "Serial pattern detector. It samples a one-bit input stream and recognizes a specific sequence received over consecutive samples: a zero, followed by three ones, and then two zeros. The match output is asserted when the complete sequence has just been observed; the not-match output is asserted when an attempted sequence has failed and the failure has been fully qualified, and the two indications are mutually exclusive. After either outcome the detector continues searching for the next occurrence. Both outputs are normally low and are cleared while the asynchronous active-low reset is asserted."} {"number": "CodeV-R1-RL-train-0355", "content": "### Dual-read, single-write register file\n\n- Holds 2^DEPTH 32-bit registers indexed by a DEPTH-bit register number.\n- Two read ports continuously present the contents of their addressed registers.\n- The write port updates the addressed register when the write enable is asserted.\n- Reads and writes are independent, there is no reset, and register contents are not initialized."} {"number": "CodeV-R1-RL-train-0614", "content": "# Two-Byte Register\n\nCollects two successive 8-bit writes into a 16-bit register, high byte first and low byte second.\n\n- Each byte capture is gated by the enable input.\n- Active-high reset clears the register and the byte phase."} {"number": "Correctbench-HDLBits-116", "content": "# Dual-Input Logic Functions\n\nComputes the fundamental combinational functions of two single-bit inputs.\n\n- The seven outputs provide the conjunction, disjunction, exclusive-or, negated conjunction, negated disjunction, negated exclusive-or, and \"first input AND NOT second\" results, each identified by its port name.\n- Outputs are purely combinational, with no clock, reset, or state.\n"} {"number": "MG-Verilog-01399", "content": "Design an AXI-Stream sample-rate interpolator.\n\nEach accepted input sample shall be presented on the output and repeated a programmable number of times determined by the configuration input.\n\nThe input ready indication shall be asserted when the interpolator is able to accept a new sample, and the output valid indication shall be held asserted while a stored sample is being repeated.\n\nAfter the programmed repetitions, the next input sample shall be loaded when available; otherwise the output valid indication shall be deasserted until a new input sample arrives.\n\nReset shall be synchronous and active low."} {"number": "MG-Verilog-08143", "content": "A power-management handoff controller. It tracks whether a transaction is outstanding.\n\n- A completion request marks a transaction as pending, and a completion-done indication clears it.\n- A configuration turn-off request is granted only while no transaction is pending; otherwise the grant is withdrawn.\n- Reset is asynchronous and active low."} {"number": "MG-Verilog-09092", "content": "The module converts a 32-bit single-precision floating-point value into a 64-bit double-precision value using valid/acknowledge handshakes on both sides.\n\nIt first offers an input acknowledge; when an input valid is seen, it captures the operand and withdraws the acknowledge.\n\nThe conversion preserves the sign, rebases the exponent and widens the mantissa by appending low zero bits; infinity and NaN exponents map to the all-ones double exponent.\n\nA zero exponent with a non-zero fraction is normalized by left-scaling until the leading mantissa bit reaches the double-format position, with the exponent adjusted for each step; a zero fraction converts to zero.\n\nThe result is presented with an output valid held until the output acknowledge is received, after which the module returns to accept the next input.\n\nThe active-high reset is synchronous and returns the module to the input-accept state with both handshake outputs deasserted."} {"number": "OpenRTLSet-005792", "content": "# Extended RISC-V Control Decoder\n\nThis combinational unit decodes the opcode, function-3, and function-7 fields of an extended RISC-V instruction into the datapath control signals.\n\nRegister-register instructions select the ALU operation (add or subtract, logical shifts, set-less-than variants, and bitwise operations), enable the register write, and take both operands from the register file. Loads request the memory read and select the memory data for write-back on word accesses, immediate instructions select the immediate operand, stores request the memory write, and the upper-immediate instructions write the immediate or the PC-relative value into the register file. Conditional branches select the subtraction comparison and request the branch program-counter source, while jump-and-link requests the jump source and writes the return address. The branch-type output reports the branch or jump type, and the set-less-than/jump selection output distinguishes the result source for the set-less-than and jump instructions.\n\nCustom encodings additionally assert controls for display transfer, halt, special-register read and write, switch-to-register, wait, and context, process-identifier, and preemption-check operations. Any instruction outside the supported set leaves all controls deasserted. The unit is purely combinational.\n"} {"number": "OpenRTLSet-010145", "content": "The module computes the unsigned product of two 32-bit operands and presents the full 64-bit result.\nThe multiplier is pipelined: a new operand pair is accepted on every clock, and the corresponding product appears at the output a fixed number of clock cycles later.\nNo validity indication accompanies the result, so the consumer must account for the fixed pipeline delay.\nAn asynchronous active-high reset clears the pipeline and forces the product to zero."} {"number": "OpenRTLSet-011157", "content": "# Hexadecimal seven-segment decoder\n\nCombinational decoder that converts a 4-bit hexadecimal value into the segment pattern for a seven-segment display. Segments are active low: a segment line is driven low when that segment must light.\n\nThe pattern appears on `out[6:0]`, with bit 0 driving segment a through bit 6 driving segment g. All sixteen hexadecimal digit patterns are produced."} {"number": "OpenRTLSet-015309", "content": "# ALU Control Decoder\n\nDecodes the ALU operation field together with the instruction function field into an ALU control code.\n\n- Operation field 0 selects addition (loads, stores, add), operation field 1 selects subtraction (branches, subtract), and operation field 2 selects add, subtract, and, or or set-on-less-than according to the function field.\n- The ALU control encoding is implementation-defined."} {"number": "OpenRTLSet-020728", "content": "# Debounced Key Scanner\n\nDebounces a mechanical key input and reports its stable state. The asynchronous key is synchronized before use; a new level is accepted only after it has persisted for the full debounce interval, and a contrary edge during that interval restarts the process.\n\nAn accepted press produces an event pulse, and the debounced pressed/released state is reported continuously with a low level indicating pressed. Active-low reset initializes the key to the released state."} {"number": "OpenRTLSet-024545", "content": "The receiver shall acquire one byte from a serial peripheral device using the device clock-edge indications and the serial data input.\n\nReception may be armed to begin at the frame start condition, or requested to begin immediately; a request is ignored while a received-byte valid indication is still asserted.\n\nThe frame shall be regarded as eight data bits followed by a parity position and a stop position; the parity and stop values are not compared.\n\nWhen the stop position is reached, the captured byte shall be presented with a single-cycle valid indication, and the receiver shall return to idle.\n\nA synchronous active-high reset shall return the receiver to idle and clear the byte output and the valid indication."} {"number": "OpenRTLSet-042151", "content": "`note_pitch2dds_1st_gen` converts a MIDI note number and pitch-bend value into the 32-bit phase increment of a DDS oscillator, interpolating between adjacent semitones.\n\nPorts: `CLK`, note `NOTE[6:0]`, pitch-bend `PITCH[13:0]` centered at 8192, and phase-increment output `ADDER[31:0]`.\n\nA fixed note-to-phase-increment table covers the 128 notes, with the lowest notes sharing a floor value. The pitch-bend input shifts the note by up to twelve semitones with a fractional remainder; the output interpolates between the bent note's increment and the next semitone's increment using that remainder.\n\n`ADDER` is updated on each clock and holds the phase increment for the oscillator."} {"number": "OpenRTLSet-047261", "content": "# Washing Machine Sequence Controller\n\nThe controller sequences the soak, wash, drain, rinse, and spin phases of a washing machine, with low and high variants of the soak and wash phases chosen by the select input at start.\n\nFrom idle a start request is accepted only when the external timer indications select the first phase, and the sequence then advances as the timer indications step through soak, wash, drain, rinse, and spin, after which the machine returns to idle. The selected soak and wash variants assert their low or high phase outputs, while drain, rinse, and spin assert their respective outputs; an idle indication accompanies stopping or completing the sequence. A stop request at any point returns the machine to idle. The reset input is asynchronous and active high, returning the sequence to idle.\n"} {"number": "OpenRTLSet-049527", "content": "# 1080p RGB 4:4:4 Video Test Source\n\nProvides the static video-format configuration and the sample stream for a 1080p RGB 4:4:4 source, one stream word per clock.\n\n- Static outputs describe the format: a 1080p visible area with its line and frame totals, sync widths, start offsets, sync polarity, progressive scan, RGB 4:4:4, 8 bits per colour, and the audio, 3D, and colourimetry metadata settings.\n- Each stream word carries two 9-bit symbols plus a switching flag; the symbols distinguish pixel data from control tokens.\n- Visible lines carry the test colour during the active portion; blanking intervals and blank lines carry the blanking control tokens.\n- Each line comprises a fixed number of transfer units and each frame the configured number of lines; control tokens mark the transitions between the video and blanking regions.\n- The source is always ready; the outputs are fixed configuration or generated stream data, requiring no runtime programming."} {"number": "OpenRTLSet-056948", "content": "# 8 x 8-Bit General Register File\n- Eight 8-bit registers, each with an independent write enable; registers not selected for writing retain their contents.\n- A separate 16-bit wide input supplies r0 and r1 as low and high bytes when the wide-source select is active; all other registers take the 8-bit data input.\n- Two combinational read ports, each addressed by one-hot select lines, return the value of the selected register.\n- The r6/r7 pair is additionally exported as one 16-bit value with r7 in the high byte.\n- Synchronous active-high reset clears every register."} {"number": "OpenRTLSet-070872", "content": "# 3-bit Encoder\n\nCombinational encoder that reproduces its 3-bit input code on the output, except that the code with only the middle bit set is translated to the code with only the lowest bit set. All other codes, including zero, pass through unchanged."} {"number": "OpenRTLSet-075271", "content": "# Pipeline Register with Stall and Flush\n\n- Captures the decode-stage bundle — instruction, operands, register indices, immediate, program counter and branch address, branch prediction, and all datapath control signals — for the execution stage.\n- A stall request freezes the current contents; a flush request or reset clears every field.\n- Updates are synchronous, with flush and reset taking precedence over stall."} {"number": "PyraNet-Verilog-004571", "content": "# IR Emitter Register File\n8-bit register bank for controlling an IR emitter over a host-style address/data interface.\n- Registers cover device ID and revision, a command register (modulator run plus busy status), a control register (modulator mode, LED value and polarity, interrupt flag and enable), carrier cycle and duty lengths as 16-bit low/high pairs, memory read start/stop addresses as 13-bit pairs, a memory address register, and GPIO port/direction bytes.\n- Reads return the addressed register one cycle after the address is presented; multi-byte fields are accessed as separate low and high halves and reserved addresses read zero.\n- Writing the command register drives the modulator run output; writing the control register updates the mode, LED value and polarity, interrupt enable, and clears the latched interrupt.\n- An interrupt is latched when the modulator busy indication falls, and is reported when enabled.\n- Active-high asynchronous reset clears all registers, applies the default GPIO port and direction values, and sets the LED polarity to its default state."} {"number": "PyraNet-Verilog-006035", "content": "# ALU Operand Multiplexer\n\nSelects the ALU's second operand: the sign-extended immediate when `ALUSrc` is asserted, otherwise the register read data. The selected 32-bit value appears on `ALUIn2`."} {"number": "PyraNet-Verilog-006750", "content": "# DDR PHY Delay Control\n\nSupplies per-lane delay values and delay-line strobes for write leveling, read leveling, and phase detection in a DDR PHY.\n\n- The effective read/write direction is taken from the selected IO configuration, with the DQS output-enable forcing the write direction for the supported DRAM type; the controller or PHY configuration source is chosen by the data-select input.\n- During the write direction, each lane takes its delay value from the write-leveling set; during the read direction it takes the read-leveling set, or the phase-detection set once phase detection is active and read leveling has completed.\n- Delay values are distributed to the four DQS groups according to the configured lane locations and captured in the corresponding resynchronized clock domain.\n- Delay clear and increment strobes follow read leveling until read leveling completes, then follow phase detection when enabled; disabling phase detection through the debug control reverts them to the read-leveling source.\n- The delay-line reset outputs mirror the module reset."} {"number": "PyraNet-Verilog-007184", "content": "# UART Receiver with Oversampled Bit Timing\nReceives an asynchronous serial frame consisting of a start bit, DATA_BITS data bits (least significant first), and a stop bit, using an external sample tick that oversamples each bit period.\nThe receiver arms on a low start bit, confirms it near the middle of the start period, samples each data bit at its center, and after the stop-bit period emits a one-cycle completion strobe together with the assembled parallel data.\nIf the start bit is no longer low at its midpoint, the frame is abandoned and the receiver returns to idle without a completion strobe.\nThe stop-bit length is set by the STOP_TICK parameter. Reset is asynchronous and active low."} {"number": "PyraNet-Verilog-011375", "content": "# Vending Machine Controller\n\n- Controls a vending machine: a start command followed by a product code selects one of five products and latches its price; payment is accepted either in coins or online.\n- The machine dispenses when the inserted coin total reaches the selected price or when an online payment is reported; the change is the coin total minus the price, or zero for an online payment.\n- A cancel command aborts the transaction and returns the machine to idle.\n- Dispensing is signalled for one phase while the selected price and the change are output; the current phase is exported with an implementation-defined encoding.\n- Reset is active-high and asynchronous."} {"number": "PyraNet-Verilog-016289", "content": "# Hexadecimal to Seven-Segment Decoder\n\nThe decoder converts a 4-bit hexadecimal value into an active-low seven-segment pattern.\n\n- Values zero through nine produce the standard decimal digit glyphs and values ten through fourteen produce the letters A through E.\n- The value fifteen uses the default glyph, which is the letter F.\n- The eighth output bit repeats the decimal-point input, so the point is driven independently of the segment pattern.\n- The conversion is purely combinational."} {"number": "PyraNet-Verilog-016787", "content": "The module is a command bridge that accepts one-byte commands over a UART receive interface and configures or drives an SPI port, an I2C port and the UART transmit side. Each command byte is counted, and a command then either updates a configuration register, launches a transfer, or returns a value.\n\nConfiguration commands set the UART, SPI and I2C clock dividers, the SPI clock polarity and phase, the SPI chip-select level and the I2C host-acknowledge value. Transfer commands forward a received byte to the SPI or I2C agent and, once the respective handshake completes, return the agent's response over UART; I2C start and stop commands issue the corresponding bus requests and wait for the agent's ready indication.\n\nA test command echoes a received byte. The interface also reports the last byte transmitted to and received from an agent, together with the number of command bytes processed.\n\nAll outputs are registered, and an asynchronous active-high reset restores the default dividers, levels and idle state."} {"number": "PyraNet-Verilog-017273", "content": "# UART Autobaud Detector\n\nMeasures the bit period of an incoming serial stream from a calibration character and provides a recovered baud clock once that character is verified.\n\n- The line is expected to idle high; a falling edge starts measurement. The start bit and the first data bits are timed to derive the bit period.\n- The received character is then checked against the built-in calibration pattern by sampling at successive bit midpoints; on a match the measured period is adopted.\n- The baud clock output pulses once per measured bit period and then runs continuously, and the locked output reports that a valid rate has been adopted.\n- A mismatching character discards the measurement and returns the detector to idle, ready to measure again.\n- Reset is active high and asynchronous."} {"number": "PyraNet-Verilog-019506", "content": "# Asynchronous QDR Interface\n\nBridge a 32-bit host port to a source-synchronous QDR memory port using an acknowledge handshake across independent clocks.\n\n- A host request is accepted while the host enable is asserted; it stays pending until the memory response has crossed back, then a one-clock host acknowledge is returned. The host address, write data, byte enables and direction must remain stable until the memory side captures them.\n- The memory address is the host address with the three low bits dropped, aligning each access to an eight-byte pair; separate direction outputs identify reads and writes, and the memory request is asserted with the transfer.\n- Write data maps each host byte into a 36-bit lane with a zero parity bit inserted above it; read data takes the four data bytes from the returned 36-bit lanes and discards the parity bits.\n- The aligned pair is handled as two beats: byte enables are driven only on the beat selected by address bit two, and the other beat drives cleared byte enables.\n- For a read, completion is timed from the memory acknowledge using the configured latency; the first returned word is used when address bit two is zero and the second when it is one. Writes complete without returned data.\n- A memory-side response pulse is synchronized into the host domain and cleared when the synchronized request is withdrawn; the host acknowledge is emitted after that handshake completes.\n- Each clock domain has its own synchronous, active-high reset."} {"number": "PyraNet-Verilog-024485", "content": "# Adaptive Residual Coder Front-End\n\nProduces coding decisions for image prediction residuals.\n\n- Forms a signed residual between the current sample and the reference sample, wrapped into the signed sample range; the residual direction is selected by an input.\n- Per-context adaptation statistics track residual magnitudes, an adaptation count, and a bias count, and the Rice coding parameter is derived from them.\n- For each valid sample the unit emits a zero count, a magnitude value, and a bit count describing the residual code; when the shifted magnitude exceeds the contextual limit, an escape bit count is used instead.\n- Results and the valid indication are pipelined to the output.\n- Reset initializes the per-context statistics; two contexts are kept and selected by the context input.\n"} {"number": "PyraNet-Verilog-033991", "content": "Cache controller mediating byte, half-word and word accesses between a CPU, a cache and main memory.\n\n- The access size and a signed flag accompany each request; the size selects the active byte lanes of the data path.\n- A write to a cacheable address presents the selected data bytes to main memory one bus cycle at a time, advancing the memory address per byte, until the programmed size is covered and the memory reports ready.\n- A read request first consults the cache; on a hit the cache data is returned directly.\n- On a miss the required bytes are read from memory into a buffer, assembled little-endian into the requested value, sign- or zero-extended according to the signed flag, driven to the cache write-data port and returned to the CPU.\n- Requests whose address has the top bit set are not serviced and the controller remains waiting.\n- A ready output indicates the controller is idle and able to accept an access, and is deasserted while an access is in progress.\n- Synchronous reset returns the controller to idle."} {"number": "PyraNet-Verilog-043561", "content": "The module is the instruction decoder and control generator for a 32-bit RISC-V processor.\n\n- It extracts the source and destination register indices from the instruction and classifies the opcode as register-register ALU, immediate ALU, branch, direct or indirect jump, load, store, upper-immediate, or system.\n- Register write-back is enabled for every class that produces a result, with the written value selected among the ALU result, loaded memory data, jump return address, and upper immediate.\n- ALU control comes from the function fields and covers the arithmetic, logical and comparison operations, including the add/subtract and logical/arithmetic shift distinctions.\n- The branch comparison type is selected for conditional branches, and the program counter is redirected for an indirect jump, a direct jump, or a taken branch, remaining sequential otherwise.\n- Load and store controls select the access size and forward the store access type; a memory-write indication is asserted only for stores.\n- The immediate format and the ALU operand sources are selected per instruction class.\n- A system instruction raises the halt indication."} {"number": "PyraNet-Verilog-045545", "content": "# I2S Left-Channel Receiver\n\nCaptures the left-channel word of an I2S serial stream and presents it with a valid indication.\n\n- Channel boundaries are taken from the word-select line; serial data is collected only around the left channel.\n- Sixteen bits are collected most-significant bit first into the output word.\n- A one-cycle valid pulse marks the completed word after the sixteenth bit; collection restarts at the next left-channel boundary.\n- The output word is cleared at each channel transition.\n- Reset is asynchronous and active low."} {"number": "PyraNet-Verilog-068261", "content": "# Month Sequencer\n\nThe unit models a twelve-month calendar counter that advances one month on each accepted trigger and wraps from December back to January.\n\nThe trigger input is synchronized to the clock and rising-edge detected, so each input pulse produces exactly one advance. After reset is released the sequence performs one automatic advance from January to February, so the first external trigger moves the state to March. The current month is reported on the state output with an implementation-defined encoding, and an idle code is reported while the main reset is asserted. A separate state-reset input returns the sequence to January without disturbing the trigger synchronization. The main reset is active high and synchronous.\n"} {"number": "PyraNet-Verilog-074477", "content": "# Overview\nMoore-style sequence controller with one input and one output. Reset is asynchronous and active high and returns the controller to its start phase.\n\n# Behaviour\n- Each phase lasts one clock. From the start phase a high input leads to an intermediate phase, while a low input bypasses it into the phase that follows it.\n- The remaining phases always advance in a fixed order and eventually return to the start phase; when taken, the intermediate phase occupies one extra clock before that order resumes.\n- The output is asserted during the intermediate phase and during the last phase before the start phase, and is low in the other phases.\n"} {"number": "PyraNet-Verilog-086031", "content": "# AD7606 8-Channel Parallel ADC Interface\n\nFree-running acquisition controller for an eight-channel parallel-output ADC: it triggers conversions, waits for conversion completion, reads all eight channels in ascending order, and repeats indefinitely.\n\n- Startup holds the converter in reset for a fixed initialization interval, then releases it.\n- Each acquisition issues a conversion-start pulse (active low), allows a fixed settling delay, then proceeds once the converter's busy indication is deasserted.\n- Channels 1 through 8 are read in order through a chip-select/read-strobe handshake (both active low); the converter's parallel output word becomes the sample of the addressed channel.\n- `ad_ch1`–`ad_ch8` hold the latest complete set of 16-bit channel samples; a data-valid pulse reports each completed set.\n- `rst_n` is an asynchronous active-low reset; converter control outputs idle deasserted. Oversampling is fixed to none, and `first_data` is unused.\n"} {"number": "PyraNet-Verilog-087076", "content": "Design a DMA-to-AHB transmit controller that converts a requested transfer length into successive AHB bursts.\n\nThe controller shall split the remaining byte count into bursts sized according to the FIFO room: full word groups shall be transferred as word-sized beats, a final partial word shall use byte-sized beats, and each burst shall be issued only when the FIFO can accept the corresponding number of words.\n\nOn a transfer request with sufficient FIFO space, the controller shall latch the source address and the transfer direction and assert the transfer-enable indication, then wait for the AHB acknowledgment; each acknowledgment shall reduce the remaining byte count.\n\nThe source address shall advance to the address reported with each completed AHB transfer, and a new burst shall be issued as soon as the remaining bytes and the available FIFO space allow.\n\nWhen the remaining byte count reaches zero, the controller shall wait for the final data-done indication and then report data completion to the DMA, returning to idle.\n\nReset shall be asynchronous and active low."} {"number": "PyraNet-Verilog-087516", "content": "### Instruction decoder for a 32-bit RISC-V integer core\n\n- Derives all datapath control solely from the instruction word: ALU operation, register-file write enable, writeback source, second ALU operand selection, data-memory read/write enables and access width, and jump/link indications.\n- Register-register instructions write the ALU result back to the register selected by the instruction, with the ALU operation selected by the function fields.\n- Register-immediate arithmetic and logic instructions select the immediate as second operand and write the ALU result back.\n- Loads read memory with the width selected by the instruction and write the loaded value back; stores write memory with the selected width and leave the register file unchanged.\n- Branches select a comparison operation and write neither registers nor memory.\n- Upper-immediate instructions produce a result from the immediate, or from the program counter plus immediate.\n- Jumps assert a jump indication and write a link value; the jump-register form additionally asserts its own indication.\n- Unsupported instruction encodings leave register and memory writes disabled.\n- The decoder is purely combinational and has no clock or reset."} {"number": "PyraNet-Verilog-090121", "content": "# UART Receive Controller\n\nSequences a UART receiver through start-bit validation, data-bit reception, optional parity checking and stop-bit checking, aligned to the middle of each bit by the external bit and edge counters. Per-phase enables are issued for sampling, deserialization and the start, parity and stop checks.\n\n- A low serial input while idle begins a frame; a detected start glitch aborts it.\n- The parity phase is entered only when parity checking is enabled.\n- data_valid pulses when the stop check passes and any enabled parity check has passed; a parity or framing error returns the controller to idle without valid data.\n- Reset is asynchronous and active low."} {"number": "PyraNet-Verilog-092424", "content": "# Matrix-vector multiply with median output\n\nFor each of two input frames, computes a 3x3 matrix multiplied by a 3-element vector, producing three dot products, and adds the middle value of those three as a fourth result.\n\nA frame consists of the nine matrix elements followed by the three vector elements; after the two frames are collected, the eight results are presented sequentially on the output with a ready strobe, and the next pair of frames is then collected.\n\nThe computation is registered and synchronous. Reset is asynchronous and active high."} {"number": "PyraNet-Verilog-093388", "content": "# Triple Memory-Port Router\n\nRoutes two memory request streams, each carrying an address, data, start and read/write qualifier, onto three output ports. The 3-bit select chooses which port each request stream drives, covering the six possible ordered pairings of the two streams onto two of the three ports; the unused port is driven with fixed idle values. Address and data widths are parameters, and all routing is combinational."} {"number": "PyraNet-Verilog-094276", "content": "# Cache Controller\n\nControls a separate instruction cache and a data cache, both organized as 64-bit lines and accessed by halfword requests through one shared memory port.\n\nA read or write request completes from the addressed cache when that cache reports a hit: a read returns the addressed halfword from the line, and a write replaces that halfword within the line. The ready handshake reports completion.\n\nAn instruction-fetch miss fetches the addressed memory line into the instruction cache. A data miss fetches the addressed line into the data cache, first writing back the victim line when it is dirty; refills store the returned line, and write-back sends the dirty line's tag and index to memory.\n\nMemory accesses use line-aligned addresses with read and write strobes. Reset is asynchronous and active low."} {"number": "PyraNet-Verilog-095748", "content": "# 32-Bit MIPS-Style Arithmetic Unit\n\nA combinational 32-bit functional unit selected by a five-bit function code. It supports operand pass-through, signed and unsigned addition and subtraction, increment and decrement, addition and subtraction of four, bitwise AND/OR/XOR/NOR including immediate forms that use the low half of the second operand, upper-half load, logical shift left and right by one, arithmetic shift right by one, signed and unsigned set-less-than, and constant generation. It produces negative and zero flags from the result plus carry and overflow flags where applicable; the high result word is zero. The function encoding is implementation-defined."} {"number": "PyraNet-Verilog-095925", "content": "### Four-queue AXI4-Stream packet demultiplexer\n\n- Consumes 256-bit AXI4-Stream packets and routes each packet to one of four output streams according to the VLAN tag carried in the first data beat.\n- The tag supplies a VLAN protocol identifier and a queue identifier; forwarding requires the protocol identifier to match the expected VLAN type and the queue identifier to select one of the four outputs (numbers one through four select the outputs in order).\n- Packets that do not match are not forwarded and are never replicated to more than one output.\n- Forwarded packets keep their data, byte-enable, user sideband and end-of-packet information unchanged.\n- Each output uses valid/ready flow control, and a beat is presented to the selected output only when that output can accept it.\n- Reset is active-low and clears all stream outputs and the input ready indication."} {"number": "PyraNet-Verilog-096813", "content": "# UART Receiver\n\nReceives 8N1 UART frames — one start bit, eight data bits least-significant first, and one stop bit — and presents the received byte with a data-ready flag. The read strobe clears data-ready. A character arriving while the previous one is still unread raises an overrun error, and a stop bit that is not high raises a frame error. Reception is gated by the enable input. Active-low synchronous reset clears the receiver.\n"} {"number": "PyraNet-Verilog-097428", "content": "# SV32 Translation Lookaside Buffer\n\nParameterized-size, fully associative TLB for SV32 translation, with lookup, flush, update, and replacement interfaces.\n\n- Lookup takes a virtual address and an address-space identifier and reports a hit together with the stored 32-bit translation entry and whether the mapping covers a 4 MB page.\n- An entry matches when it is valid, its address-space identifier matches or the entry is global, and its virtual page number matches; 4 MB entries compare only the upper page-number field.\n- Flush invalidates matching entries: clearing both flush identifiers clears every entry; a virtual address alone invalidates matching entries across address spaces; an address-space identifier invalidates only that space's non-global entries.\n- Update writes one selected entry from the update input, marking the new entry valid.\n- Replacement is pseudo-LRU: lookup hits update the replacement state, and a one-hot replacement-enable output marks the entry currently chosen for replacement.\n- The full entry array is exported through the content and tag ports.\n- Reset is asynchronous and active low, clearing all entries and replacement state."} {"number": "PyraNet-Verilog-097778", "content": "# SDRAM read burst controller\n\nServices a read request for the requested burst length from a 24-bit address, driving a single-bank SDRAM command and address interface.\n\nThe addressed bank and row are activated, the row-to-column delay is observed, the column read command is issued, and the column-access latency is observed before the burst data is returned together with the read acknowledge.\n\nAfter the burst the controller terminates the burst, precharges the bank, observes the precharge delay, and then signals that the read is complete.\n\nThe read data output is zero whenever data is not being acknowledged.\n\nParameters TRCD, TCL and TRP define the activation, column-access and precharge wait durations. The interface operates on an active-low asynchronous reset."} {"number": "PyraNet-Verilog-098941", "content": "A melodic-sequence classifier.\n\n- Notes arrive one per valid-note strobe. A sequence is accepted when its first two notes are non-rest and its third note is one of the two accepted La or Si codes.\n- The next note selects the class: an immediate rest gives the adjacent class; a Do after La, or a Re after Si, followed by a rest gives the complete class; a Si after La followed by a rest gives the advanced class. Any other continuation is an error.\n- A completion flag indicates that classification has finished, and a two-bit type reports adjacent, complete, advanced, or none for an error.\n- The current state is exported for monitoring, and reset returns the classifier to its initial state."} {"number": "PyraNet-Verilog-099586", "content": "Implement the debug SRAM read port that fetches one word over an AXI read channel and forwards unrelated read responses to the CPU.\n\n- On an information flag, a single-beat AXI read request is issued at the configured start address with a fixed debug request identifier and fixed burst attributes; only one request may be outstanding.\n- When the request is accepted, the read-ready output is asserted to receive the response matching the debug identifier; the returned data word is latched and a memory-valid flag is pulsed.\n- The byte of the latched word selected by the low address bits is presented as the memory read data.\n- Read responses carrying any other identifier are captured and forwarded to the CPU with their identifier, data, and last indication, together with a valid flag.\n- The forwarded response is held until the CPU accepts it while the break-point input is inactive, after which the forwarded outputs and flag are cleared.\n- An asynchronous active-low reset clears the request, the ready output, the forwarded outputs, and all flags."} {"number": "PyraNet-Verilog-100107", "content": "# Dual-Channel Tone Generator\n\nThe module shall generate independent left and right audio square waves whose frequencies are set by separate divider values.\n\nEach channel shall alternate between a positive and a negative amplitude at its programmed rate.\n\nThe output amplitude shall be scaled by a 3-bit volume setting, with zero volume producing silence and increasing settings producing a larger swing.\n\nThe audio outputs shall be combinational functions of the generated square waves and the volume setting.\n\nReset shall clear the divider counters and the square-wave phases."} {"number": "PyraNet-Verilog-103157", "content": "# Asynchronous FIFO\n\nThe FIFO buffers data between two independent clock domains: items are enqueued on the write clock and dequeued on the read clock, each side having its own enable and active-high reset. Full is reported to the write side and empty to the read side, and a read presents the oldest stored word on the read-domain output. The clock-domain crossing uses a parameterized number of synchronizer stages; data width, depth, synchronizer depth and memory type are parameters."} {"number": "PyraNet-Verilog-103552", "content": "# Text Record Format Checker\n\nValidates a character stream against a record grammar and reports which of two variants was recognized.\n\n- A record starts with a caret, followed by one to four decimal digits, an '@', eight hexadecimal digits, a colon, and optional spaces.\n- The variant marker is either '$' followed by one to four decimal digits, or '*' followed by eight hexadecimal digits; optional spaces and a '<' follow.\n- The remainder is an '=' followed by eight hexadecimal digits, a '#', and a closing caret.\n- The format output reports the recognized variant once a complete record has been accepted, and reports none otherwise.\n- Any unexpected character restarts recognition at the beginning of a record; reset forces the idle state.\n"} {"number": "PyraNet-Verilog-104624", "content": "# UART byte transceiver\n\nBridges a parallel byte interface to a full-duplex UART line.\n\n- Transmission: a byte is accepted when the transmitter is ready and clear-to-send permits; it is sent as a start bit, eight data bits least-significant first and the configured number of stop bits at the configured baud rate.\n- Reception: the receiver synchronises to the falling start edge, samples each bit at mid-bit time, checks the stop bit, and presents the received byte with a valid indication.\n- Flow control: the ready-to-send output is released whenever the received-byte buffer is empty or already consumed, and the transmitter's ready indication additionally depends on clear-to-send.\n- The baud divisor and the stop-bit count are parameters; an active-high reset clears both directions."} {"number": "PyraNet-Verilog-106164", "content": "The module is a small multi-cycle processor core with separate instruction-memory and data-memory interfaces.\nIt fetches an instruction word at a valid-qualified instruction address and executes register-immediate and register-register arithmetic/logic operations, loads, stores, and conditional branches; a dedicated halt opcode asserts a finish indication that remains set until reset.\nThe supported arithmetic/logic operations are addition, subtraction, exclusive-or, or, and, and logical shift-left and shift-right by an immediate or register amount.\nThe instruction address advances sequentially unless a taken conditional branch redirects it; equal and not-equal branch conditions are supported, using a sign-extended offset.\nLoads and stores form their data address from a base register plus an immediate offset; store data comes from a second source register, and loaded data is written back to the destination register along with arithmetic/logic results.\nNeither the instruction-valid nor the data-valid input affects execution, and memory responses are assumed to be presented without additional wait handling.\nAll state is cleared asynchronously by the active-low reset."} {"number": "PyraNet-Verilog-106370", "content": "# PCIe GTP Rate-Change Controller\n\n- Sequences a transceiver rate change: selects the pipeline clock, starts the DRP reconfiguration, drives the selected line rate, and issues the TX synchronization request, advancing as each device-done indication arrives.\n- rate_out carries the selected line rate; done marks completion and idle marks the quiescent state.\n- fsm reports the current phase for observation; its encoding is implementation-defined.\n- Active-low synchronous reset."} {"number": "PyraNet-Verilog-106731", "content": "# Modulo-M Counter\n\n- The module shall cycle through the integer sequence from zero to one less than the modulus parameter, advancing by one per clock and wrapping to zero after the highest value.\n- A maximum-tick indication shall be asserted while the current value equals the highest value.\n- The width of the represented value shall be set by the width parameter derived from the modulus.\n- An asynchronous, active-low reset shall clear the value to zero."} {"number": "PyraNet-Verilog-107322", "content": "Control sequencer for a simple accumulator-based processor. After reset it starts an instruction fetch: the program counter is initialized or incremented, the instruction is read from memory into the instruction register, and the opcode is decoded. Each instruction then executes its own fixed sequence: load and store instructions move data between memory and the accumulator through the address and buffer registers; arithmetic and logic instructions fetch the operand and drive the ALU with the opcode-selected operation, writing the result back to the accumulator; an unconditional jump reloads the program counter from the instruction operand; conditional jumps test the zero or negative flag and either jump or advance; a no-operation only advances the program counter.\n\nControl outputs select program-counter initialization, increment and write, instruction-register write and read, address-register write, memory clocking and write enable, buffer-register transfers, accumulator read and write, ALU operation selection and ALU enable. Reset is synchronous and active-high."} {"number": "PyraNet-Verilog-109371", "content": "This module acquires an 8-bit ADC value, derives a baseline from a configurable number of samples, and reports the deviation of each new sample from that baseline.\nThe ADC sampling clock is generated from the system clock.\nAfter the baseline is established, the input is compared against it, and a sign output indicates whether the current sample is below the baseline.\nThe voltage output is zero while the baseline is being established and zero within a small dead zone around the baseline; otherwise it is a scaled magnitude of the deviation, using a slope that depends on the deviation direction.\nThe baseline is the average of the configured number of samples.\nAn asynchronous active-low reset clears the state and outputs."} {"number": "PyraNet-Verilog-111435", "content": "The module shall implement a serial command and data-transfer controller. It shall receive command bytes from the serial input and, upon a run command, indicate readiness, capture a block of measurement data when it becomes available, and transmit that block as a sequence of bytes over the serial output, coordinating each byte transfer with the transmitter. A stop command shall leave the controller idle, and the number of run transfers shall be limited to a configured maximum before further run commands are ignored. The ready indication shall be asserted while awaiting data and withdrawn once the data has been accepted. Synchronous active-high reset shall return the controller to idle and clear the transfer state."} {"number": "PyraNet-Verilog-113742", "content": "# GF(2^4) Parallel Doubling Array\n\nApplies multiplication by x in GF(2^4) to every four-bit digit of two 32-bit words.\n\n- Each of the eight digits is doubled independently: the digit is shifted left by one and, when the shifted-out most-significant bit is set, the result is reduced with the polynomial x^4 + x + 1.\n- Both input words are processed in parallel and produce transformed output words.\n- The transformation is purely combinational."} {"number": "PyraNet-Verilog-117962", "content": "# Micro-Sequenced Datapath Control Unit\n\nSequential control unit for a small datapath. On a start request it asserts busy and runs a fixed multi-step program of register transfers, supplying for every step the register-file address, input and output multiplexer selections, write enable, constant operand, and datapath operation selection.\n\nThe program initializes registers, executes a repeated add-and-test loop that continues until the datapath's carry-out indication becomes set, then applies a final constant and clears busy to signal completion. All control outputs are registered. Reset is asynchronous and active high."} {"number": "PyraNet-Verilog-122901", "content": "The module is a RISC-V reservation station that holds decoded instructions until their operands become available and dispatches them to execution units.\n\n- Newly decoded instructions are accepted and a rename request is raised for the destination register, together with its rename tag; the request class distinguishes instructions without source operands, branches and stores, and ordinary register-register instructions so the renamer knows which sources to translate.\n- Once renaming completes, source operands are recorded: an operand whose producer is still pending keeps a producer tag and later becomes ready when a matching result is broadcast, while an already-available operand is captured directly.\n- An instruction is dispatched only when all its operands are ready; dispatch is oldest-first, selecting at most two ordinary instructions for the two ALU ports and at most one memory instruction for the load/store port, each with its operation type, operand values and destination tag.\n- A dispatched entry is released and never considered again.\n- A flush discards all buffered instructions, and the unit is held inactive while the pipeline is not ready."} {"number": "PyraNet-Verilog-123405", "content": "# Booth Multiplier Control Sequencer\n\n## Purpose\nSequences the datapath actions for a Booth-encoded multiplication from start to completion.\n\n## Requirements\n- Asserting start begins a multiplication: the accumulator, multiplier register, multiplicand register, and carry flag are cleared, then the multiplier, multiplicand, and iteration count are loaded.\n- Each iteration examines the current multiplier bit together with the previous multiplier bit: a zero-to-one pair requests an addition, a one-to-zero pair requests a subtraction, and equal bits request no arithmetic action.\n- After the arithmetic action, the partial product and multiplier are advanced by one bit position and the iteration count is reduced by one.\n- A zero iteration count ends the sequence and asserts the completion output.\n- All other datapath control outputs are inactive while idle and become active only in the phases that require them.\n- The controller is a synchronous machine clocked by the system clock and has no reset input."} {"number": "PyraNet-Verilog-127503", "content": "# Write-Data Select Mux\n\nA 16-bit write-data multiplexer: the two-bit select chooses between the ALU result, an all-ones value, a value with only the low nibble set, and zero.\n\nThe output is purely combinational."} {"number": "PyraNet-Verilog-127670", "content": "# 32x64 Register File\n\nRegister file with two combinational read ports and one synchronous write port. Each read port continuously presents the 64-bit contents of its addressed register. When write enable is asserted, the 64-bit write data is stored into the addressed register on the rising clock edge.\n\nActive-high synchronous reset clears all 32 registers to zero."} {"number": "PyraNet-Verilog-128207", "content": "The module shall implement a ten-input, eight-bit multiplexer. The four-bit select value chooses which of the ten inputs appears on the output, and a select value without a corresponding input shall select the first input. The function is combinational and has no reset."} {"number": "PyraNet-Verilog-128877", "content": "32-bit integer divider with a completion handshake. While enabled, it computes the quotient and remainder of the two 32-bit operands over multiple clock cycles and asserts complete when the result is valid. The mode input selects unsigned division or two's-complement signed division; in signed mode the quotient takes the exclusive-or of the operand signs and the remainder takes the dividend's sign.\n\nReset is synchronous and active high. Division by zero is not defined."} {"number": "PyraNet-Verilog-129523", "content": "# Switch-Controlled ALU Demonstration\n\nCombinational board-level arithmetic-logic demonstration. Three key inputs select the operation applied to the eight switches: increment the high nibble, sum the two nibbles, combine the nibbles with bitwise OR in the high half and XOR in the low half, OR-reduce the whole switch word, or pass the switch word through; two selector codes produce the same nibble sum, and the remaining codes produce zero. The eight LEDs show the eight-bit result. Six seven-segment digits display, in hexadecimal and in order, the low switch nibble, a zero digit, the high switch nibble, a zero digit, the result's low nibble, and the result's high nibble."} {"number": "PyraNet-Verilog-129705", "content": "# Accumulator-Style CPU Control Unit\n\nSequences instruction fetch, decode and execution for a small accumulator machine and drives the register-file, ALU, memory and program-counter controls.\n\n- The controller cycles through a reset phase, a fetch phase that loads the instruction register and increments the program counter, and a decode phase that selects the operation from the instruction's opcode field.\n- The instruction set comprises add, subtract, compare, move, shift left, shift right, increment, decrement, load, store, load-immediate, conditional jumps on equal, not-equal and carry, an unconditional jump, and halt.\n- Arithmetic and logic instructions select the ALU function, name their source and destination registers, and update the condition flags from the ALU status.\n- Load and store select the memory-address path and the corresponding read or write enable; load-immediate uses the immediate source and advances the program counter.\n- Conditional jumps load the program counter when the associated condition flag is set; the unconditional jump always reloads it.\n- The status output reports the current phase together with the condition flags; its encoding is implementation-defined.\n- An unknown opcode holds the controller in an illegal-instruction phase.\n- Reset returns the controller to its reset phase."} {"number": "PyraNet-Verilog-136569", "content": "# AXI-Stream FIR Filter Accelerator\n\nA parameterized-tap (eleven by default) 32-bit FIR filter with an AXI4-Stream sample input and an AXI4-Stream result output, programmed through an AXI4-Lite register interface. Coefficients are written through the register interface before a start command is issued; the coefficient store and the sample buffer are accessed through external memory ports.\n\nOnce started, input samples accepted on the slave stream are written into the sample buffer, and the master stream emits the filtered result stream with the last output flagged at the end of the input stream. A status-register read reports whether the accelerator is idle, busy, or finished.\n\nThe stream and register interfaces share one clock, and a synchronous active-low reset returns the accelerator to its idle state."} {"number": "PyraNet-Verilog-137174", "content": "# Pattern Fetch and Display Overlay\n\nReads a stored pattern from on-chip memory and streams its pixels in step with the display timing.\n\n- The controller leaves idle when the start input is asserted or the memory returns the pattern-present signature; it then fetches consecutive memory words that together hold a block of pixels.\n- Pattern pixels are emitted on the display data output while the display data-enable is active; during the designated offset line, the configured left-offset value is output in place of pattern pixels.\n- Further memory reads are issued while the current pixel block is consumed so the next block is ready in time.\n- The horizontal-sync, vertical-sync and data-enable outputs are registered copies of the corresponding inputs.\n- After the configured number of display lines, a write is issued to the memory base and the controller returns to idle.\n- A frame trigger pulses when a pattern frame starts, and starting is deferred while the frame engine reports busy.\n- Reset (active low, synchronous) clears the state, counters and outputs.\n"} {"number": "PyraNet-Verilog-138866", "content": "Design a local-bus peripheral that loads lookup-rule sets and returns parser results.\n\nThe bus address shall be captured when the address-latch indication is asserted, and the access direction shall select a read or a write transaction.\n\nA write transaction shall assemble the parser rule set and the lookup rule set from successive data words at their mapped addresses, asserting a valid indication for each rule set after its final word has been written.\n\nA read transaction shall return the most recently captured result as successive 32-bit words selected by the low address bits.\n\nThe bus acknowledgment shall be asserted for each accepted access and released when the chip select is deasserted, and the peripheral shall wait while a transaction is in progress.\n\nThe most recent parser result shall be captured whenever its valid indication is asserted.\n\nReset shall be asynchronous and active low."} {"number": "PyraNet-Verilog-139311", "content": "# PS/2 to ASCII Translator\n\nCombinational lookup that converts a PS/2 keyboard scan code into its ASCII character. Separate tables cover the unshifted keyboard, the shifted keyboard, and the additional keys reached through the extended scan-code prefix; extended translation takes precedence when both extended and shifted are indicated.\n\nWhen translation is disabled the output is zero, and a scan code without an assigned character produces an all-ones output."} {"number": "PyraNet-Verilog-139386", "content": "# Memory-Mapped I/O Decoder\n\nRoutes a 32-bit processor address to either the instruction/data memory or one of five memory-mapped registers, and multiplexes the corresponding read data.\n\n- The mapped addresses are 0x10010024 (transmit), 0x10010028 (transmit data), 0x1001002C (receive ready), 0x10010030 (receive data) and 0x10010034 (receive clear).\n- Any other address drives the instruction/data memory address and its write strobe; mapped accesses drive a zero address there.\n- Transmit, transmit-data and receive-clear registers each receive their own write strobe; writes to the receive-ready and receive-data addresses have no effect.\n- Read data is taken from the receive-ready register, the receive-data register, or the instruction/data memory, according to the address.\n- Write data is passed through unchanged. The decoder is combinational."} {"number": "PyraNet-Verilog-139982", "content": "# Arithmetic Result Multiplexer\n\n- Selects, from three 8-bit arithmetic results (sum, difference and product), the one named by the operation code and presents it unchanged at the output.\n- Purely combinational; the module holds no clock, reset or state and the selection takes effect without latency."} {"number": "PyraNet-Verilog-141177", "content": "# Asynchronous FIFO with Access-Error Flags\n\nThe FIFO buffers WIDTH-bit words between independent write and read clocks, with a parameterized depth. It reports full to the write side and empty to the read side; a write attempted while full or a read attempted while empty is ignored and flagged by a one-cycle error indication on the corresponding side. Read data appears on the read-domain output after an accepted read. An active-high reset initializes the FIFO to the empty state."} {"number": "PyraNet-Verilog-141422", "content": "# RISC-V Integer Control Unit\nCombinational control decoder for a subset of the RISC-V integer instruction set: LUI, AUIPC, ADD/SUB/XOR/OR/AND register operations, ADDI/SLLI/SRLI/SRAI immediate operations, loads, stores, BEQ/BLT/BLTU branches, JAL, and JALR.\nIt selects the immediate extension format (I, S, B, U, or J), the register-file write enable and write-back source, the memory read and write enables, the ALU operation, the ALU A-operand source, and the ALU B-operand source.\nConditional branches select equality, signed less-than, or unsigned less-than comparison; jump instructions use the program counter as one ALU operand.\nUnsupported opcodes and unhandled function combinations produce no register write and no memory or branch action. The decoder is purely combinational."} {"number": "PyraNet-Verilog-141843", "content": "# Digital Photo Frame Controller\n\nComposes a 256x256 display frame in an external frame buffer from stored photos and an on-screen clock, refreshing the display continuously.\n\n- After reset a header is read that provides the current time-of-day, the frame-buffer base address and the number of stored photos.\n- Each photo is preceded by a descriptor giving its storage address and its size class. Photo pixels are fetched, resampled to the 256x256 photo area according to that class (2x enlargement, 1:1, or 2x reduction with averaging), and written to the frame buffer as 24-bit color.\n- At the end of a photo refresh the current time is drawn as an HH:MM:SS string using glyphs read from the character ROM, with colon separators, into a fixed region of the frame buffer.\n- The time-of-day counter advances in one-second steps and wraps from 23:59:59 to 00:00:00.\n- Photos are shown in turn for a fixed interval; after the last photo the sequence repeats from the first.\n- The image-memory port is shared: reads fetch the header, descriptors and photo pixels, writes update the frame buffer and are qualified by a write-enable output; a separate port reads the character ROM.\n\nThe controller is clocked and asynchronously reset; nothing is written while reset is asserted."} {"number": "PyraNet-Verilog-144062", "content": "# Two-Line Serial Comparator\n\nCompares two serial input lines over successive clock cycles. The comparison-result output reports the outcome for the current input pair: the OR of the two lines, their equality, or the neither-active indication, depending on the comparison phase reached.\n\nThe overflow output is asserted for one cycle when the comparison sequence reaches its overflow condition and is otherwise low. Reset synchronously returns the comparator to its initial phase and clears both outputs."} {"number": "PyraNet-Verilog-144447", "content": "# AXI-Stream FIR Filter\n\nFIR filter with an AXI-stream input and output and an AXI-Lite control interface. Each accepted input sample is stored in a circular sample buffer and convolved with the Tape_Num coefficients held in a coefficient memory; the resulting sample is emitted on the output stream, with the end-of-stream flag propagated.\n\nWriting the start command through the register interface begins a processing pass, and reading the same register returns status; the coefficient memory is written and read through the register interface. Tap and sample memory ports are exposed for external RAM. Reset is active low."} {"number": "PyraNet-Verilog-147433", "content": "# Dual Butterfly Address Generator\n\n- Generate a pair of 4-bit sub-addresses and a wing select for a 32-point, five-stage traversal with sixteen butterflies per stage, indexed by a butterfly counter and a stage counter.\n- After reset the generator idles until enabled; each enable accepts one butterfly, presents its address pair and wing select on the following clock, and a one-cycle completion gap returns to idle.\n- The butterfly counter runs zero through fifteen and the stage counter zero through four; after the last butterfly of a stage the stage advances and the butterfly counter wraps, and after the last stage both counters wrap to zero.\n- The wing select is the parity of the butterfly counter.\n- At each stage the pair is formed from the butterfly counter: sub-address bits below the stage's bit position take the corresponding counter bits, the stage bit position (bit four minus the stage count) is replaced by the parity in the first address and its complement in the second, and counter bits above that position appear shifted one place toward the most significant end.\n- For stage zero no bit is replaced and both addresses equal the butterfly counter.\n- The address pair, wing select, and counters are held between steps; synchronous active-high reset clears them to the idle state."} {"number": "PyraNet-Verilog-150017", "content": "# RISC-V ALU control decoder\n\n- Derives the ALU operation selector from a RISC-V instruction using its opcode, function field and the distinguishing function bit.\n- Supports immediate arithmetic, logical and shift instructions; register-register arithmetic, logical, comparison and shift instructions, with add/subtract and logical/arithmetic right shift distinguished by the function bit; and load-upper-immediate.\n- Any other opcode selects addition.\n- The selector is produced combinationally.\n"} {"number": "PyraNet-Verilog-151496", "content": "The module shall implement a UART receiver with automatic baud-rate detection. Until synchronization, it shall observe the received line for an alternating pattern and measure the line bit period from it; upon recognition it shall report that the receiver is locked, publish the measured bit period, and place a calibration byte on the data output. In synchronized operation it shall detect the start bit, sample eight data bits at the measured bit period with the least-significant bit first, present the received byte with a one-cycle completion indication, and then await the stop bit before looking for the next start bit. When the external-override configuration is selected, the completion indication shall remain asserted instead of being cleared each cycle. Synchronous active-high reset shall return the receiver to unsynchronized operation and clear the locked indication."} {"number": "PyraNet-Verilog-160797", "content": "Immediate sign-extender for a 32-bit datapath. It widens an incoming immediate field to 32 bits by replicating the field's sign bit, preserving its signed value.\n\nThe control input selects the field width: when low, the full 16-bit field is used; when high, the low 12 bits are used and sign-extended from bit 11."} {"number": "PyraNet-Verilog-163502", "content": "A 2-bit full adder.\n\n- The two 2-bit operands and the carry input are added, producing a 2-bit sum and a carry output.\n- The function is purely combinational.\n"} {"number": "PyraNet-Verilog-163786", "content": "# QSPI Flash Command Driver\n\n- Executes a transaction selected by the command-type input: it sends an 8-bit command code and, when required, a 24-bit address on the lowest data line.\n- Depending on the command type the transaction then finishes, writes bytes from the test-vector input, writes a 16-bit status register, or reads a selected number of bytes.\n- Reads operate in single-bit or quad-bit mode, with a dummy phase where required; each received byte is presented with a byte-valid indication.\n- Completion is signalled at the end of the transaction, and the current transaction phase is reported.\n- The SPI clock is generated only while a transaction is active, with chip select asserted throughout; active-low asynchronous reset returns to idle."} {"number": "PyraNet-Verilog-166144", "content": "# ARP Receiver (GMII)\n\nReceives the GMII byte stream and filters Ethernet ARP traffic addressed to the board. A frame is accepted only when its preamble is valid, its destination is the board MAC address or the broadcast address, and its type is ARP; the sender MAC and sender IP addresses are then extracted from the frame.\n\nWhen the ARP operation is a request or a reply aimed at the board IP, the receiver reports completion, indicates request versus reply on the type output, and presents the captured source addresses. Frames failing any check are silently discarded and never report completion. Parameters: BOARD_MAC and BOARD_IP define the addresses the receiver answers to. An asynchronous active-low reset returns the receiver to idle."} {"number": "PyraNet-Verilog-166353", "content": "# Byte-Wide SPI Master\n\nSingle-byte SPI master in mode 0: transmit data changes while the clock is low and receive data is sampled while the clock is high, most-significant bit first.\n\n- A write request shifts the eight-bit transmit byte onto the serial output over eight clock periods; a read request captures eight serial input bits into the receive byte. The request must remain asserted for the whole byte, and deasserting it aborts the transfer.\n- Chip select is asserted during a transfer and released when idle. A done indication reports byte completion, and a flag input aborts the transfer while holding the slave selected.\n- The interface is clocked by the divided input clock. Reset is asynchronous and active low.\n"} {"number": "PyraNet-Verilog-172665", "content": "Configurable SPI master transceiver.\n\nThe block performs half-duplex SPI transfers selected as read or write, with a programmable serial-clock divider and an optional dummy-cycle phase carrying a configurable number of dummy clock periods. Single-lane, dual-lane and quad-lane modes are supported: eight data bits are sent most-significant bit first in single-lane mode, or packed across two or four lanes and transferred over four or two serial-clock periods respectively, with the same lanes sampled during reads. The serial clock runs only while a transfer is active, and chip select encloses the transfer. Completion is signalled by a done pulse, with an additional delayed done indication and a delayed lane output-enable provided for the external bus.\n\nOperation is synchronous with an active-high reset."} {"number": "PyraNet-Verilog-174352", "content": "# N-Bit Carry-Lookahead Adder\n\nA combinational adder that adds two N-bit operands and a carry-in, producing the N-bit sum, the carry-out, and the concatenated result of carry-out and sum. The operand width N and the group size Q are parameters; the intended function is standard binary addition for any parameterization and any carry-in."} {"number": "PyraNet-Verilog-174922", "content": "# Canonical Huffman Code Builder\n\nWalks a 29-entry code-length tree and assigns canonical Huffman codes to the literal/length symbols.\n\n- On enable, the tree is traversed one leaf per position over the eight possible code lengths; a leaf whose stored length equals the current level receives the next canonical code for that length.\n- The number of symbols at each code length is accumulated, and the count for a requested length is returned.\n- For a requested symbol index the assigned code is returned; completion is flagged when all leaves have been processed.\n- Codes are assigned in canonical order: increasing code length, symbols in leaf order.\n- Reset is asynchronous and active low."} {"number": "PyraNet-Verilog-176105", "content": "# Four-digit decimal score counter\n\nMaintains a four-digit decimal score presented as four BCD digits, least significant first. Each enemy or boss hit adds one point; destroying any of the four enemies adds one hundred points once per enemy; destroying the boss adds one thousand points once. A separate clear input zeroes the score. System reset and game start also clear the score and re-arm the one-time enemy and boss awards. Carries between digits are decimal, and the score saturates at its maximum instead of wrapping."} {"number": "PyraNet-Verilog-178579", "content": "# 3-Bit Up/Down Counter with Direction Toggle\n\nA 3-bit counter that counts up when its direction is up and down when it is down. The direction is reversed on each clock while the mode input is high, and counting continues from the current value. Reset is asynchronous and active high, clearing the count and selecting the up direction."} {"number": "PyraNet-Verilog-202110", "content": "# BCD Date Editor\n\nMaintains a two-digit BCD date with separate day, month, and year fields.\n\nIn follow mode the date tracks the supplied day, month, and year values. In edit mode, push buttons edit the field selected by the position input: the day field counts 01 to 31, the month field 01 to 12, and the year field 00 to 99. A button press increments or decrements the selected field in BCD, wrapping at the field limits, with the up button advancing and the down button retreating.\n\nReset is asynchronous and active high, loading day 01, month 01, and year 00."} {"number": "PyraNet-Verilog-205550", "content": "# Game Round Controller\n\nThe module sequences five value captures for one game round.\n\n- The controller stays idle until the mode selection enables it; an update request then starts a capture sequence.\n- Each capture requests a random value from the LFSR source and a two-second timeout, waits for the timeout indication, and records the incoming value.\n- The five recorded values are presented on separate outputs and remain stable after the round.\n- After the fifth capture, the result-valid output is raised, the segment enable is dropped, and the timeout request is released.\n- The segment enable is active throughout the capture sequence.\n- An active-low reset returns the controller to idle and clears all recorded values."} {"number": "PyraNet-Verilog-207363", "content": "# Switch-Controlled Arithmetic Demonstrator\n\nPerforms a selectable arithmetic or logic operation on switch inputs and displays the result on LEDs and seven-segment displays.\n\n- The four low switches form operand A, a three-bit switch field selects the operation, and the result appears on the LEDs.\n- Operations comprise incrementing A, adding A to the stored operand B, adding A and B, combining the bitwise exclusive-OR and OR of A and B into one result, OR-reducing the switch byte, shifting B left by A, and multiplying A by B.\n- Operand B is the low nibble of the previous result, captured on the clock key edge and cleared by the active-low reset switch.\n- One seven-segment display shows operand A, two show the current result's nibbles, and the remaining displays are blank.\n- All results are derived combinationally from the switch settings and the stored operand.\n"} {"number": "PyraNet-Verilog-207888", "content": "# 3x3 Convolution Engine with Pipelined Accumulation\n\nComputes a 3x3 convolution over a 7x7 input tile. While input-valid is asserted, input samples and filter weights are captured into buffers; once the tile is complete, the engine walks a 3x3 window across the tile and, for each window position, forms the nine products and sums them through a pipelined adder tree.\n\nThe convolution result is presented on the output with a validity indication during the execution phase and is cleared outside it. Reset is asynchronous and active low, clearing the buffers and pipeline registers."} {"number": "PyraNet-Verilog-209415", "content": "# LED Display Controller\n\nDrives sixteen 16-bit LED channels from a four-bit color input, each input bit replicated four times to fill its channel. Asynchronous reset sets all channels and outputs to all ones.\n\nA free-running refresh counter defines the display period. The sixteen channel registers are loaded from the expanded color during the first sixteen counts of the period, the display outputs are transferred from those registers at a fixed point later in the period, and, when interrupts are enabled, an interrupt is raised with the LED interrupt mode at that same point.\n\nThe address output maps the first sixteen counter states to consecutive controller addresses and is zero otherwise."} {"number": "PyraNet-Verilog-212403", "content": "# AD80305 SPI Host Interface\n\n- The module shall provide a serial control interface for 16-bit addressed accesses, with a 32-bit data word and a mode selection input.\n- A transaction shall be initiated by a rising edge on the read-request or write-request input, with the address and mode inputs valid at that time.\n- A frame shall begin with chip select asserted and a direction bit indicating read or write, followed by the mode bit and the 16-bit address, all transmitted most-significant bit first.\n- A write frame shall continue with the 32-bit write data, most-significant bit first, and the write-data input shall remain valid for the whole frame.\n- A read frame with the mode input asserted shall capture 32 returning data bits, most-significant bit first, after a turnaround interval following the address; the most recently received word shall be presented on the read-data output.\n- A read frame with the mode input deasserted shall end after the address field without transferring data.\n- The serial clock output shall be generated from the system clock; output data shall be launched ahead of the sampling clock edge and input data shall be captured on the opposite edge.\n- Chip select shall be released and the serial clock held low outside a transaction.\n- The status output shall be high while the interface is idle and low for the duration of a transaction.\n- An asynchronous, active-low reset shall release chip select, hold the serial clock low, clear the received word and return the status output to idle."} {"number": "PyraNet-Verilog-213202", "content": "Implement an up counter that produces a cyclic sequence over a fixed small range, restarting at zero after its maximum value.\nThe active-high reset is synchronous and returns the count to zero."} {"number": "PyraNet-Verilog-213354", "content": "# Serial Receiver Controller\n\nTiming control for a 9-bit serial frame receiver (eight data bits plus a parity bit). After detecting the start bit, it times nine bit periods, each divided into sixteen counting intervals, and drives the load and shift controls of an external deserializer so each bit is captured near the middle of its period; the assembled value is presented on the value output.\n\nCompletion is signalled by the done output after the last bit period. The clear input reinitializes the receiver, and a new start bit can be detected immediately after a frame. Reset is asynchronous and active low."} {"number": "PyraNet-Verilog-214246", "content": "Memory-read and byte-stream transmit controller. On a start request it sequentially reads a block of consecutive 32-bit words from an external memory, driving the request and write-enable strobes together with a running address, and captures each returned data word. After the block has been read it releases the memory interface and transmits the captured words as a byte stream, most-significant byte first, presenting each byte on the transmit data output with a transmit-enable strobe that marks the start of the byte interval. When all captured bytes have been sent it returns to idle and does not accept another start until the status-clear input has been asserted. A synchronous active-low reset clears the controller."} {"number": "PyraNet-Verilog-215494", "content": "# LZ77 Compressor\n\nCompresses a symbol stream with LZ77 using a sliding history window. It fills the window with input symbols, searches the recent history for the longest match of up to three symbols, and emits the match offset, match length, and next literal symbol together with a valid strobe; an encode output marks encoded data. The history and lookahead window advance as tokens are emitted, and finish is raised once the entire window has been processed. Reset is asynchronous and active-high."} {"number": "PyraNet-Verilog-215719", "content": "# Four-Port Queue Arbiter\n\n- Arbiter for a four-queue switch: selects one non-empty input queue to pop and pushes into the destination queue indicated by dest.\n- A push occurs when the destination queue's data is valid and no queue is almost full; when any queue is almost full, neither pops nor pushes are issued.\n- Pop selection uses a fairness scheme that bounds the number of consecutive grants per input queue before lower-priority inputs are served, and skips empty queues.\n- A reset-state indication clears the fairness counters."} {"number": "PyraNet-Verilog-215891", "content": "Convolution (dot-product) engine for a two-channel 4x4 input tile with matching 4x4 weights.\n\n- The input tile and its weights are captured through independent valid-qualified loads; the engine multiplies corresponding elements and sums all 32 products into a 13-bit result.\n- The result is presented with a valid indication while the engine is computing; the indication is inactive when the engine is idle.\n- Weights may be reloaded independently of input capture, allowing different filters to be applied to successive tiles.\n\nReset is active-low and asynchronous.\n"} {"number": "PyraNet-Verilog-219213", "content": "The module is a streaming controller that sequences an external data source.\nA start request begins the sequence from idle.\nThe sequence first asserts a read request, then additionally asserts a first enable, and finally asserts the valid output together with the second enable and both earlier controls.\nThe controller remains in this final phase until done is asserted; on the cycle done is seen the controls are cleared and the controller returns to idle.\nThe outputs are registered.\nThe reset input is synchronous and active high."} {"number": "PyraNet-Verilog-220405", "content": "# Multi-Function Datapath Unit\n\nRegistered datapath that executes a 19-bit instruction and produces a 16-bit signed result. The instruction carries a 3-bit operation selector, four operand fields and an extended 10-bit operand, captured when the instruction is accepted.\n\n- Selector 0: the lowest operand field chooses bitwise AND, OR, exclusive-or, addition or subtraction of the two middle operands.\n- Selector 1: product of the second, third and fourth operand fields.\n- Selector 2: square of the sum of the second, third and fourth operand fields.\n- Selector 3: second operand plus the extended operand.\n- Selector 4: second operand minus the extended operand.\n\nA result-valid indication accompanies each completed result, and reset clears all operands, result and valid state."} {"number": "PyraNet-Verilog-224378", "content": "# MIPS-like Control Decoder\n\nCombinational decoder that maps a MIPS-style opcode to the datapath control bundle: register write, register/immediate operand selection, destination selection, ALU operation code, memory read and write, memory-to-register write-back, branch indication with a branch-type field, jump indication, an OR-immediate marker, and a jump-and-link flag.\n\nSupported instructions are register-register operations, add-immediate, OR-immediate, load-upper-immediate, load and store word, equal and not-equal branches, greater-than-zero and less-or-equal-zero branches, and jump/jump-and-link. Four branch conditions are distinguished by the branch-type field.\n\nUnrecognized opcodes produce a control bundle with no register or memory side effects."} {"number": "PyraNet-Verilog-225439", "content": "# Data-Cache Control Sequencer\n\nCombinational control sequencer for a write-back data cache. From the current phase and the request and cache-status inputs it derives the next phase together with all tag/data-memory and memory-bus controls.\n\n- A read or write request accepted while idle enables the cache compare path and advances to the hit/miss decision.\n- A valid hit completes at the decision: loads are marked as returning data and stores enable the data-memory write, with a potential-hit indication.\n- On a miss, a valid dirty line is first written back to memory, otherwise the controller proceeds directly to line refill; refill moves the line as an ordered sequence of word beats with advancing memory and cache offsets.\n- A stall input freezes the phase sequence and asserts the cache-stall output; the request type selects the final refill completion path and whether the data-memory write stays enabled.\n- The current phase is an input and the following phase an output; both encodings are implementation-defined.\n"} {"number": "PyraNet-Verilog-226776", "content": "# Endpoint Routing Lookup\n\nCombinational destination-port lookup for a network router: for a destination endpoint address, it reports the output port to which packets for that endpoint must be forwarded.\n\nRouting is fixed per source endpoint, selected by the `SRC_E_ADDR` parameter. Each source has its own complete assignment of destination endpoints to output ports, so different sources use between two and four output ports.\n\nAddress and port widths are parameterised."} {"number": "PyraNet-Verilog-229512", "content": "# Triple Timer Register Interface\n\nA memory-mapped register interface that connects a bus master to three timer/counter instances.\n\nWrite accesses decode the address into per-timer register strobes for clock control, counter control, interval, match, and interrupt-enable registers. Read accesses return the selected timer register contents on the read-data output, and reading an interrupt-status register clears the corresponding timer's pending interrupts. Reset is active-low."} {"number": "VeriGen-016406", "content": "# 32-bit RISC-V ALU\n\nComputes arithmetic, logic, shift, and comparison results for a 32-bit RISC-V datapath. The five-bit operation code selects addition, subtraction, bitwise AND/OR/XOR, logical or arithmetic shifts, and equality and relational comparisons in signed and unsigned forms; shift counts are taken from the second operand.\n\nA separate adder path accepts extended mult/div operands when selected, exposing both the 32-bit sum and its extended form to the multiplier/divider. The selected operation result is driven on the ALU result output, while comparison outcomes are exported separately as a one-bit comparison result and an equality indication from the adder path."} {"number": "VeriGen-018743", "content": "# Operation Control Decoder\n\nCombinational decoder mapping a 7-bit operation ID to the datapath control fields: ALU function, operand-B source, operand sign-extension and channel-B offset-fill selection, register port selection, memory write permission, memory address handling, special-register update mode, and data direction.\n\n- Each operation ID selects one fixed combination of these fields from the decode table; fields not overridden by the operation keep their resting values.\n- Confirmation-sensitive and continue-sensitive operations gate `enable` with the corresponding input and mark the operation as input, output, or both.\n- Register-source selection for one operation depends on `mode_flag`.\n- An unrecognized ID clears the register-source selection and leaves the remaining controls at their resting values.\n"} {"number": "VeriGen-027345", "content": "The module is a combinational control unit whose outputs do not depend on the opcode or on reset.\n\nThe program-counter mux and data mux selects are zero, the ALU operand select is high, the ALU control is one, the register write enable is high, and the memory read enable is low.\n\nThe register-file write-enable and I/O-operation outputs are not driven.\n\nThere is no sequential logic; the clock input is unused."} {"number": "VeriGen-070613", "content": "# AES S-Box\n\nCombinational AES substitution box: maps an 8-bit input byte to its AES S-box value, or to its inverse S-box value when the decrypt select is asserted.\n\n- The forward map applies the AES S-box transformation (multiplicative inverse in the AES field followed by the affine transform); the inverse mode reverses that mapping.\n- The output is purely combinational with no clock or reset.\n"} {"number": "VerilogASTBench-002684", "content": "# Four-bit Johnson Counter\n\nProduces a four-bit Johnson (twisted-ring) sequence.\n\n- On each clock the bits shift toward the more significant positions, and the complement of the most significant bit enters at the least significant position.\n- Active-low asynchronous reset clears all bits.\n"} {"number": "VerilogASTBench-006584", "content": "# LFSR Interval Timer\n\nGenerates a periodic 1 ms tick using a pseudo-random sequence as the timing base.\n\n- While enabled the sequence advances and a single-cycle pulse is emitted each time the terminal count is reached, after which the sequence restarts.\n- When disabled the sequence and tick are held in their initial state.\n- `rst` is active-low asynchronous reset."} {"number": "VerilogASTBench-034792", "content": "# Execution-to-Memory Pipeline Register\n\nCaptures an execution-stage result bundle for use by the memory stage, with flush and synchronous clear.\n\n- When the write enable is asserted, the bundle is captured: memory read and write controls, memory-to-register select, register write enable, destination register, program counter, ALU result, and store data.\n- With the write enable low, the previous contents are held.\n- Flush, or a high level on the reset input (which is active high despite its name), clears all outputs; both are sampled synchronously.\n"} {"number": "VerilogASTBench-039264", "content": "# MIPS Control Decoder\n\nThe module decodes MIPS opcode and function fields into datapath control for a single-cycle processor.\n\n- Register-type operations use both register operands, select a register destination, and enable register writeback; shift operations are identified separately.\n- Immediate-type ALU operations use an immediate operand and write back to the instruction's target register.\n- Load and store instructions use immediate-offset addressing; loads enable register writeback from memory, and stores request a memory write.\n- Accesses whose computed address falls in the dedicated I/O region are routed to I/O read and write strobes instead of memory.\n- Equal and not-equal branches select the comparison operation and are reported on separate branch indications.\n- Jump, jump-and-link, and register-jump instructions are distinguished; the link form enables writeback and the register form does not.\n- All outputs are combinational."} {"number": "VerilogASTBench-044991", "content": "This module implements a byte-level I2C master controlled by individual start, write, read and stop commands.\nA command is launched by a write request and completes with a done indication; the controller reports ready when idle and when awaiting the next command.\nA programmable divider sets the quarter-period timing of the serial clock, and start and stop conditions are produced on the serial data line.\nFor a write, the supplied byte is shifted out most significant bit first, and the slave acknowledgement is observed on the data input.\nFor a read, the data line is released during reception, the incoming byte is captured, and the master acknowledges it.\nThe received byte is presented on the data output when a read completes and is zero otherwise.\nThe acknowledgement output reflects the serial data input during a write command and is inactive otherwise.\nAn asynchronous active-low reset returns the controller to idle."} {"number": "VerilogASTBench-047109", "content": "# Text Output Controller for VRAM Display\n\nAccepts host character codes and renders a scrolling text line into video memory.\n\n- A character strobe captures the character code presented by the host, and busy and done indications report the transaction state back to the host.\n- Characters are written to video memory with a fixed color at a fixed text row, advancing one position along the line per character.\n- Backspace moves the write position back one, and line feed fills the remainder of the line with blanks.\n- Reaching the end of the line starts a fresh line, clears it, and advances the display offset to scroll the text.\n- Non-printing control codes are discarded without writing.\n- The current character is exported, and an asynchronous reset clears the write position, display offset, pending handshake state, and video-memory outputs."} {"number": "VerilogASTBench-047861", "content": "# UART LED Controller\n\nDrives a red/green indicator pair for each of the transmit and receive directions. After reset it runs a startup sequence in which both LEDs are lit for one interval and then extinguished for the next, after which normal operation begins. In normal operation the green LED follows the data-activity input of its direction, while the red LED stays lit unless the matching error input is asserted, in which case it flashes.\n\nBoth startup intervals span sixty million clock cycles and the error flash toggles every twelve million cycles. Reset is asynchronous and active low."} {"number": "VerilogASTBench-058892", "content": "# 4-to-16 One-Hot Decoder\n\nThe module decodes a 4-bit register address into a 16-bit one-hot selection.\n\n- Address zero selects the least significant output bit, and each successive address selects the next higher bit.\n- All selection outputs are cleared when write enable is deasserted.\n- The decoder is combinational and has no reset."} {"number": "VerilogASTBench-064160", "content": "# PS/2 Keyboard Receiver\n\nReceives PS/2 keyboard frames. After the start bit, the eight data bits are captured into the upper byte of the 24-bit output, least-significant bit of the byte first; the output is updated once the eight data bits have been received and holds the last complete scan code until the next frame.\n\nThe PS/2 clock is synchronized to the module clock, and its falling transitions mark the bit times. The remaining bits of the output are zero. The asynchronous active-high reset clears the output and returns the receiver to idle."} {"number": "VerilogASTBench-069182", "content": "# MIPS-Style Main Control Decoder\n\nThe module decodes a 6-bit MIPS-style opcode into datapath control signals: register-file write, destination-register select, ALU operand-2 selection, immediate-extension selection, memory write, memory-to-register writeback, jump, branch-equal, branch-not-equal, and an unknown-instruction indication. The ALU-operation output carries the opcode for the downstream ALU decoder.\n\nRegister-register instructions write the rd destination; immediate arithmetic, logical-immediate, and load instructions use the immediate operand, with the signed-immediate forms also asserting the extension select; loads additionally write memory data back; stores enable the memory write; jumps and the two branch types assert their respective controls; coprocessor-0 accesses enable a register write. Any other opcode raises the unknown-instruction indication.\n\nThe module is purely combinational."} {"number": "VerilogASTBench-072877", "content": "# OLED I2C Setup Sequencer\n\nSupplies the slave address, control byte and register address for an I2C OLED initialisation sequence, driven by the I2C state and a command index.\n\n- At the start condition the fixed OLED slave address is presented together with the write direction.\n- After each acknowledge, one of four control-byte formats is selected, and the register address associated with the requested command index is presented.\n- Each command index maps to a fixed register address and also determines the control format.\n- A continuation flag alternates with the frame timing so consecutive frames are marked appropriately.\n- Reset selects the default control format and clears the continuation flag."} {"number": "VerilogASTBench-073894", "content": "# Arithmetic Unit Controller\n\nSequences an add/subtract, multiply, or divide operation and returns its result.\n\n- On a trigger, the controller latches both operands and selects the datapath indicated by the operation code: the adder (with its operation controlled by the code's low bit), the multiplier, or the divider.\n- The controller remains in the selected operation until the corresponding datapath reports its result valid, then returns to idle.\n- The returned result is captured and flagged valid.\n- A work indication is asserted from the trigger until the result is returned.\n- Reset is asynchronous and active-low.\n"} {"number": "VerilogASTBench-082191", "content": "# LPC peripheral target with serial interrupts\n\nA target-side LPC interface. While a frame is active it monitors the 4-bit LAD bus, decodes I/O read and I/O write cycles, and assembles the 16-bit I/O address from four consecutive nibbles. A read cycle asserts a read strobe once the address phase completes and returns the 8-bit value supplied on the read-data input in two LAD nibbles, low nibble first, after the turnaround cycle. A write cycle captures two data nibbles, low first, into the write-data output and asserts a write strobe at the end of the data phase; a cycle-enable indication accompanies both accesses.\n\nA cycle continues only when the address-hit input confirms that this target is selected; otherwise the interface releases the bus and returns to idle, as it does when the frame ends early.\n\nThe interface also serialises interrupts for eight sources onto the open-drain SERIRQ line: after the start frame is detected, each active source pulls the line low in its designated slot and releases it in the following slot, while inactive sources leave the line undriven. Asynchronous active-low reset returns the interface to idle."} {"number": "VerilogASTBench-084167", "content": "Implement the controller that sequences a multi-stage transform datapath built from vector, rotation, transpose, inverse, and multiply units.\n\n- An asynchronous active-low reset returns the controller to idle and clears all valid and completion outputs.\n- A start request in idle launches the vector stage: the vector and register-file result indications are asserted with the request, and the vector result is marked valid again once the vector unit reports completion; the operand-set selection is set to the vector phase throughout.\n- On vector completion the rotation phase begins and repeats for a fixed number of rounds; each round waits for rotation completion indications and issues result-valid pulses on the rotation paths that finished, with a transpose-valid indication whenever a rotation pair completes.\n- After the last rotation round, transpose and inverse result-valid indications are issued and the operand-set selection moves to the inverse phase.\n- The inverse phase runs a fixed number of passes, issuing result-valid indications during its passes and switching the operand-set selection to the multiply phase at the end.\n- In the multiply phase, start requests for the transpose and inverse units are issued, the multiply result-valid indication is held, and once the multiply unit reports completion the controller asserts its completion output and returns to idle.\n- All result-valid outputs are registered before presentation and stay deasserted while their stage is inactive."} {"number": "VerilogASTBench-096813", "content": "# Packet Router Flit Controller\n\nSequences flit handling for a packet-switched router. Accepts a flit when ready, extracts its packet sequence number, flit type, and routing information, and distinguishes head, body, and tail flits.\n\nFor a head flit, it launches route computation with the flit's routing information, waits for completion, and records the returned direction in a per-packet route table. Body and tail flits reuse their packet's stored route. Each flit then requests a virtual channel using the stored direction and the selected VC, waits for the grant, requests the switch crossbar for that direction, and waits for the switch grant; on grant it signals completion with a clear indication and, for a tail flit, releases the route entry.\n\nThe controller reports ready whenever it can accept a new flit and returns to accepting flits after completion.\n\nReset is asynchronous and active low."} {"number": "VerilogASTBench-097286", "content": "# Falling-Letter Game Frame Generator\n\nGenerates the graphics-ROM address for the current raster pixel in a letter-dropping game, and reports game state.\n\n- A new column and letter are taken from the external random selection at each frame; the letter stack in that column descends by one row at each velocity tick, keeping earlier letters visible below.\n- When the key input matches the lowest letter of the stack, or the selected position holds no letter, the score increases by an amount scaled by the level input; otherwise one life is lost.\n- While lives remain, the raster is mapped to the background, the stacked letter tiles, and the descending column; pixels outside the play area map to a blank background.\n- When no lives remain, the raster is mapped to a static multi-tile end screen at a fixed screen region.\n- The life count and score are reported alongside the ROM address; the address selects a tile and the offset within it for the current pixel.\n"} {"number": "VerilogASTBench-102199", "content": "# Packet Length Counter\n\nMeasures the lengths of up to 16 packets carried in a 512-bit word and packs the results into the length output, alongside registered copies of the data and sideband signals.\n\n- Counting is enabled only for the generation modes that carry packet boundaries; a packet begins at an asserted start-of-packet lane and its length is captured at the matching end-of-packet lane.\n- Length is counted in units of four lanes and stored in the packet's position in the packed length field.\n- Registered copies of the data word, start/end markers, and write/valid sideband signals are provided with the length result."} {"number": "VerilogASTBench-103991", "content": "# Fixed-Point PID Motor Controller\n\n## Function\nComputes a PWM duty from a pulse-count speed measurement using a fixed-point PID loop with programmable gains.\n\n## Requirements\n- The target speed is the five-bit switch value placed in the fixed-point scale, and the measured speed is five times the pulse-count input.\n- On a timer pulse the measurement and target are captured, the loop runs, and the result is presented on the duty output; between updates the last duty is held.\n- The error is the target minus the measured speed; the accumulated error forms the integral term and the error difference from the previous update forms the derivative term.\n- The proportional, integral and derivative terms are each the corresponding gain multiplied by its error term and scaled down by 512, keeping 36 bits.\n- The duty is the sum of the three terms, clamped to 10000 in the duty scale, and the fourteen-bit output is its integer part.\n- A companion reset output is asserted during reset and from a timer pulse until the next idle-cycle update.\n- Reset is synchronous, active high and honoured in the idle state; it clears the error history, the accumulator, the duty register and the output.\n- The computation takes a fixed sequence of multiply and accumulate steps, one step per clock."} {"number": "VerilogASTBench-112152", "content": "# Machine-mode CSR and trap unit\n\nThe module implements the machine-mode control and status registers of a 32-bit RISC-V hart together with trap entry and trap return. Software selects a register by index and reads it at any time; writes follow replace, set-bit or clear-bit semantics according to the operation code. The implemented set covers status, ISA information, interrupt enables, trap vector, scratch, exception program counter/cause/value, interrupt pending, and read-only identification registers; unimplemented indices read as zero and read-only registers ignore writes.\n\nThe status register retains the global interrupt-enable and previous-enable state; the interrupt-enable register holds the machine software, timer and external enables; the ISA register reports a 32-bit base ISA with multiply/divide support.\n\nPending interrupts are masked by the global interrupt enable. External interrupts take priority over software and timer interrupts; among external sources the lowest-numbered enabled source supplies the cause. A non-maskable interrupt is honoured once after reset or after a trap return.\n\nTrap entry occurs for an exception, a non-maskable interrupt, or an accepted interrupt, provided the pipeline is not stalled. The current instruction address becomes the return address, the cause is recorded with interrupts distinguished from exceptions, the interrupt-enable state is saved and further interrupts disabled, the exception value is cleared, and the taken source remains marked pending for the handler's duration.\n\nThe next-fetch address supplies the trap entry point: the vector base for exceptions and, for interrupts, the base advanced by one vector slot per cause code. A trap return restores the saved interrupt-enable state, releases the pending mark, and re-permits non-maskable interrupts.\n\nAfter reset all register content is cleared except the trap vector, which defaults to a vector-table base in vectored mode."} {"number": "VerilogASTBench-112207", "content": "# RISC-V Instruction Decoder\n\nCombinational decoder for 32-bit RISC-V integer instructions that produces the datapath control bundle, CSR write indication, trap indication and writeback-source selection.\n\n- Decodes register-register, register-immediate and word-width arithmetic, logic and shift instructions, choosing between add/subtract and between logical/arithmetic right shift from the instruction's function bits.\n- Decodes loads and stores, selecting the access width from the instruction.\n- Decodes conditional branches, jump-and-link, jump-and-link-register, LUI and AUIPC.\n- Decodes CSR instructions and system instructions, asserting the CSR write indication for CSR updates and reporting system-trap conditions through the trap indication.\n- The control bundle selects register and memory write enables, immediate generation, ALU and branch operations, operand selection, writeback source and memory access width."} {"number": "VerilogASTBench-131126", "content": "# Radix-2 FFT Twiddle-Angle Sequencer\n\n- The module shall generate the twiddle-angle index sequence of a radix-2 FFT run, presenting the current index on Theta and the current stage number on Stage.\n- A Start request shall begin a run by asserting Busy; the run shall span bw_fftp stages, each lasting 2^bw_fftp clocks.\n- Theta shall remain zero throughout the first stage; each later stage shall enumerate the angle indices in bit-reversed order, with the number of distinct indices doubling per stage and the sequence restarting at each stage boundary.\n- The last angle index of the final stage shall remain valid through the completion indication.\n- When the final stage ends, Busy shall deassert and End shall pulse for one clock, after which the module shall be idle with Theta and Stage cleared.\n- The Stage output shall report the current stage number, advancing from zero through bw_fftp-1 before the run terminates.\n- An asynchronous active-high reset shall clear all outputs and the run progress."} {"number": "VerilogASTBench-131188", "content": "# Four-Digit Seven-Segment Multiplexer\n\nThe module shall time-multiplex four four-bit values onto a common seven-segment display.\n\nThe display shall cycle through the four digit positions, activating one active-low digit anode at a time and selecting that position's value.\n\nThe selected value shall drive the seven segment cathodes in active-low form, decoding values zero through nine and showing a dash for all other values.\n\nThe decimal point shall be lit only on the most significant digit position.\n\nReset shall asynchronously clear the scan counter."} {"number": "VerilogASTBench-133759", "content": "# UART Register Interface (Wishbone Slave)\n\nThe module provides a Wishbone-style slave register interface for a UART peripheral.\n\nThe software-visible registers cover transmit data, receive data, the baud divisor, configuration, FIFO trigger thresholds, a transmit delay, interrupt/status, and receive and transmit FIFO occupancy.\n\nA write to the transmit data register passes the byte to the transmitter and pushes it into the transmit FIFO; reading the receive data register returns the received byte and pops the receive FIFO.\n\nThe configuration register controls receiver and transmitter resets, stop-bit length, parity enable, parity type, and the transmit inter-byte delay; the baud divisor is programmed separately.\n\nThe status register reports transmit-trigger reached, receive-trigger reached, parity error, and start/frame error; writing it clears the flags selected by the written value.\n\nParity and start/frame error indications from the line side are synchronized, latched as sticky status flags, and acknowledged individually.\n\nAn interrupt is asserted whenever any status flag is set.\n\nA read of the receive data register, or of the status register while receive data is available, pops the receive FIFO; a write of transmit data pushes the transmit FIFO.\n\nReset is asynchronous and active low."} {"number": "VerilogASTBench-135437", "content": "# Reciprocal Read-Only Memory\n\nThe module shall provide a read-only memory that maps an eight-bit address to the full-scale value 65535 divided by that address, rounded to the nearest integer with ties resolved to the even value.\n\n- Address zero shall map to zero.\n- The contents shall be fixed and shall not depend on any state or control input.\n- A read shall be synchronous: the data output shall be updated one clock after the address is captured and shall remain stable until the next address is captured."} {"number": "VerilogASTBench-136201", "content": "The module shall implement a two-entry write-transaction queue for a DMA controller. It shall accept a transaction descriptor when a transaction is requested while space is available, storing it in one of two banks that are used alternately, and shall indicate whether space remains for another descriptor. The occupancy count shall increase on acceptance and decrease as queued entries are cleared, with one or two entries removable at a time. The stored descriptor fields, including the descriptor-start indication, internal descriptor number, external descriptor address and flag, destination address and operation, data widths, byte count, priority level, chaining and next-descriptor information, and interrupt-on-process, shall be presented at the outputs for the bank selected for output, with a separate destination-address output for the bank selected for reading. A per-bank data-valid status shall be set for the read-selected bank when its data is acknowledged or its descriptor starts, and cleared for the bank being cleared; an in-queue indication shall be asserted while entries exist and the output-selected bank has valid data. Asynchronous active-low reset shall clear the queue and its status."} {"number": "VerilogASTBench-147900", "content": "# Wash-Cycle Minute Timer\n\nTracks elapsed wash-cycle time from an oscillator input, deriving seconds and minutes with a selectable input-clock frequency.\n\nThe unit pulses its one-minute, two-minute, and five-minute outputs at the corresponding elapsed times, counts five-minute events into the wash count, and reports the current elapsed minutes. Counting is suspended while the enable is low, the wash count clears when counting is disabled, and the done input clears the elapsed minute and clock counts. Reset is active-low."} {"number": "VerilogASTBench-153435", "content": "# Double-Precision Renormalizer\n\nConverts a 96-bit unsigned intermediate value into a 64-bit IEEE-754 double-precision result.\n\n- The exponent field reflects the binary weight of the most significant set bit, and the 52-bit significand is taken from the bits immediately below that bit.\n- Leading-one positions above the significand window are aligned by discarding low-order bits; positions below it are aligned by shifting left with zero fill.\n- The sign bit is always zero, and an all-zero input produces an all-zero output.\n- The conversion is purely combinational."} {"number": "VerilogASTBench-161783", "content": "# 4-to-1 Multiplexer\n\nCombinational selector that forwards one of four 4-bit inputs to the output. Select values 0 through 3 choose the inputs in order, with the first input selected by zero."} {"number": "VerilogASTBench-161988", "content": "# Configurable UART Core\n\nFull-duplex UART with independent receive and transmit engines. The character format is programmable: data width in bits, stop-bit count, and the bit period as a clock-count rate.\n\n- Reception synchronizes the serial input, detects and validates the start bit, samples the data at mid-bit, and shifts in the configured number of data bits least-significant bit first before waiting out the stop period. A synchronized receive strobe marks a received character, which is held until acknowledged.\n- Transmission starts when the transmit strobe is asserted: a start bit, then the data bits least-significant bit first, then the programmed number of stop bits. A ready indication shows when a new character can be accepted.\n- Reset is synchronous and active-low."} {"number": "VerilogASTBench-163913", "content": "# 3x3 Signed Matrix Multiplier\n\nComputes the product of two 3x3 matrices of 9-bit signed elements. Each of the nine outputs is the sum of the three signed products of a row of the first matrix with a column of the second, and is 19 bits wide.\n\nAll outputs are registered, and the asynchronous active-low reset clears every output to zero."} {"number": "VerilogASTBench-166000", "content": "Pipelined Fixed-Point Combine Stage\n\n- Three-stage pipeline that combines four unsigned fixed-point operands into one rescaled difference.\n- The first stage aligns and sums each operand pair using fixed binary shifts; the second stage subtracts one pair sum from the other.\n- The final stage presents the difference rescaled by the alignment factor, keeping only the output-width slice, and has no reset.\n- Asynchronous active-low reset clears the two arithmetic stages.\n- The result is available with a fixed latency of three clock cycles after the operands are applied.\n"} {"number": "VerilogDB-003121", "content": "# FP-Format Conversion Pipeline Stage\n\nOne-stage pipeline register for an FP-format conversion pipeline. It forwards a 6-bit payload with valid/ready handshaking: a new payload is accepted when the stage is empty or the downstream is ready, and the current payload is held otherwise; upstream readiness reflects that condition. Reset is asynchronous and active low."} {"number": "VerilogDB-012559", "content": "This module implements a four-color memory-sequence game with four keys, four LEDs and a speaker.\nIt generates a pseudo-random color sequence, stores it in a memory of thirty-two entries, and plays it back by lighting the corresponding LED and sounding the matching tone.\nThe playback interval for each entry shortens as the sequence grows.\nAfter playback the player must reproduce the sequence with the keys within a timeout.\nA correct key press flashes its LED and sounds its tone, while a wrong press or a timeout ends the game with a loss indication and an error tone.\nCompleting the full sequence advances the game to a longer one; completing the last sequence lights all LEDs and plays a victory tone.\nThe start input aborts the current game and restarts the sequence from the beginning.\nThe speaker emits a square wave whose frequency follows the selected tone.\nAn asynchronous reset clears the memory, LEDs, speaker and interface state."} {"number": "VerilogDB-027981", "content": "# sbox_replace\n\nCombinational 8-bit AES S-box. Each input byte maps to its AES substitution byte. No clock or reset."}