A collection of various tips and tricks when using FPGA tools, namely Intel Quartus Prime Suite and ModelSim/Questa.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make sure we're not on Wayland, because xrandr doesn't work on Wayland | |
if [ "$(loginctl show-session $(loginctl user-status $USER | grep -E -m 1 'session-[0-9]+\.scope' | sed -E 's/^.*?session-([0-9]+)\.scope.*$/\1/') -p Type | grep -ic "wayland")" -ge 1 ]; then # stolen from stackoverflow | |
echo "You aren't using X!" | |
exit | |
fi | |
# no more annoying cursor | |
tput civis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A demonstration of Duff's Device, | |
* which entangles a switch/case statement | |
* with another C idiom, like a do/while. | |
* | |
* https://en.wikipedia.org/wiki/Duff%27s_device | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* c-tools.h | |
* | |
* My collection of useful stuff that C doesn't come with | |
*/ | |
#ifdef RUSTY_INT_TYPES | |
#include <stdint.h> | |
typedef int8_t i8; | |
typedef int16_t i16; | |
typedef int32_t i32; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
VGASimulator.py - Pedro José Pereira Vieito © 2016 | |
View VGA output from a VHDL simulation. | |
Ported from VGA Simulator: | |
https://github.com/MadLittleMods/vga-simulator | |
by Eric Eastwood <[email protected]> | |
More info about how to generate VGA output from VHDL simulation here: | |
http://ericeastwood.com/blog/8/vga-simulator-getting-started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": [ | |
{ | |
"name": "Linux", | |
"browse": { | |
"path":[ | |
"/usr/include", | |
"/usr/local/include", | |
"/usr/src/linux-headers-5.8.0-41-generic/include", | |
"/usr/src/linux-headers-5.8.0-41-generic/arch/x86/include/", |