Skip to content

Instantly share code, notes, and snippets.

@bkw777
bkw777 / Quartus_13_on_Ubuntu_23.md
Last active October 2, 2025 06:36
Quartus 13.0 & ModelSim on Ubuntu 24
#
# This file is part of LiteX.
#
# Copyright (c) 2015-2019 Florent Kermarrec <florent@enjoy-digital.fr>
# Copyright (c) 2017 Pierre-Olivier Vauboin <po@lambdaconcept>
# Copyright (c) 2021 Jevin Sweval <jevinsweval@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
from pathlib import Path
import os
@alsrgv
alsrgv / tmds.cpp
Last active February 20, 2023 12:51
TMDS in C++ HLS
#include <assert.h>
#include "tmds.h"
#include "utils.h"
template<int X>
ap_uint<log2up(X)> count_ones(ap_uint<X> data) {
ap_uint<X> result = data[0];
for (int i = 1; i < 8; i++) {
#pragma HLS UNROLL
@alsrgv
alsrgv / tmds.sv
Last active August 2, 2025 00:20
TMDS encoder/decoder in SystemVerilog
package tmds_pkg;
typedef struct packed {
logic inv_q_m;
logic use_xor;
logic [7:0] q_m;
} tmds_encoded_t;
typedef enum logic [9:0]{
CTRL_00 = 10'b1101010100,
@cathalmccabe
cathalmccabe / hls_example_wrapper.tcl
Last active January 25, 2023 09:21
HLS stream example
################################################################
# This is a generated script based on design: streams_example
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################
namespace eval _tcl {