Skip to content

Instantly share code, notes, and snippets.

@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

@brabect1
brabect1 / custom_coverpage.rst
Created January 28, 2024 20:06
Custom cover page with LaTeX memoir class.

Custom Coverpage with LaTeX memoir

Example showing use of custom cover page with memoir class of article class option. There are some few "tricks" to yield the desired effect.

@brabect1
brabect1 / git_commit_transfer.rst
Last active January 1, 2024 19:40
Shows how to export and import Git repository. #git #export #import #patch