Skip to content

Instantly share code, notes, and snippets.

@brabect1
brabect1 / delay_annotation_with_sdf.rst
Last active July 4, 2025 13:17
SDF delay annotation #sdf #sta #sim

SDF Delay Annotation

IEEE Std 1800-2012:

SDF files contain timing values for specify path delays, specparam values, timing check constraints, and interconnect delays.

Annotating from within Sim

@brabect1
brabect1 / bus_hazards_tolerant_model.rst
Created March 24, 2025 19:58
Verilog modeling of inertial bus changes #verilog

Tolerate Glitches on Bus Transitioning between Stable States

This example shows how to use Verilog inertial delay modeling to avoid dynamic hazards on a bus changing from one stable state to another, such as when caused by differences in delays of individual bits.

@brabect1
brabect1 / crc_8_ccitt.rst
Last active January 21, 2025 18:23
LFSR based implementation of CRC-8-CCITT #crc #lfsr #SystemVerilog

LFSR based implementation of CRC-8-CCITT

@brabect1
brabect1 / ignore_bus_assignment_delta_cycles.rst
Last active July 29, 2024 09:17
Displaying bus value at the end of time slot #systemverilog

SystemVerilog: Display eventual observed bus value

Problem: For a bus, ignore delta cycle changes and report only the eventual value at the and of the current time (slot).

`timescale 1ns/1ps

module tb;
@brabect1
brabect1 / title_refs.rst
Created July 22, 2024 07:52
References to titles/headings in reStructuredText #rst #references #links #refid

References to Titles/Headings in reStructuredText (RST)

In RST, one can easily refer to a title/heading (or more generally to a section start, which the heading really is) by using its text as a reference. For example:

... some text and then reference to `My Heading`_ ...

My Heading
~~~~~~~~~~
@brabect1
brabect1 / python_productivity.rst
Created June 22, 2024 10:12
#python #uml #diagrams

Python Prductivity Tips

UML Class Diagrams

Pyreverse (part of Pylint):

  • natively supports .dot (GraphViz), UMLet and PlantUML outputs
  • useful options
@brabect1
brabect1 / even_integer_distribution.rst
Last active June 24, 2024 04:40
distributing an integer total into n integers of almost the same value #python

Distributing total into evenly sized integers

A snippet showing how to distribute even integral weights (e.g. percantage).

from random import randrange

def distribute(n,total=100):
@brabect1
brabect1 / customizing_rst_syntax.rst
Last active June 29, 2024 11:48
Customizing reStructuredText Markup #rst #docutils #python #markup #customization

Customizing reStructuredText (rst) for Domain-specific Syntax

  • document tree
    • created by a Parser component (i.e. from reStructuredText input)
    • manually constructed
  • docutils components
@brabect1
brabect1 / open_sta.rst
Last active May 4, 2024 15:03
OpenSTA #sta

OpenSTA

OpenSTA is an open-source STA tool by Parallax (hence a.k.a. Parallax STA/Static Timing Analyzer). User Manual is part of the repository.

Build