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
import SCons.Builder | |
import SCons.Tool | |
from SCons.Errors import StopError | |
import jinja2 | |
from jinja2 import FileSystemLoader | |
from jinja2.utils import open_if_exists | |
from jinja2.exceptions import TemplateNotFound | |
import os |
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
from myhdl import * | |
def TrivialTest(sig_out, sig_in, reset, clock): | |
@always_seq(clock.posedge, reset=reset) | |
def _trivial_test(): | |
sig_out.next = sig_in | |
return _trivial_test |
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
from myhdl import * | |
def interface_twiddler(interface, clock, reset): | |
@always_seq(clock.posedge, reset=reset) | |
def twiddle(): | |
interface.a.next = interface.b + interface.c | |
return twiddle |
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
from myhdl import * | |
CACHE_SIZE = 20 | |
NUM_OF_ADDRESSES = 25 | |
# entity creation: | |
def vga_fifo( | |
# ports: | |
clk, | |
rst, |
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
-- File: /tmp/tmpsSOg4v/dut_convertible_top.vhd | |
-- Generated by MyHDL 0.9dev | |
-- Date: Fri Apr 3 10:04:52 2015 | |
library IEEE; | |
use IEEE.std_logic_1164.all; | |
use IEEE.numeric_std.all; | |
use std.textio.all; |
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
from myhdl import * | |
from multiprocessing import Process, current_process, Value, Event, Semaphore | |
process_count = Value('i', 0) | |
sync_semaphore = Semaphore() | |
all_synced = Event() | |
def synchronise(): | |
with sync_semaphore: | |
process_count.value += 1 |
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
from myhdl import * | |
PERIOD = 10 | |
A = Signal(intbv(0)[25:]) | |
clock = Signal(bool(0)) | |
reset = ResetSignal(0, async=False, active=1) | |
def ClockSource(clock): |
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
from myhdl import * | |
a = Signal(intbv(0)[5:]) | |
clock = Signal(False) | |
reset = ResetSignal(False, active=True, async=False) | |
def clockgen(clock): | |
@instance | |
def clkgen(): |
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
from myhdl import * | |
import threading | |
a = Signal(intbv(0)[5:]) | |
b = Signal(intbv(0)[5:]) | |
clock1 = Signal(False) | |
clock2 = Signal(False) | |
reset1 = ResetSignal(False, active=True, async=False) |
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
from myhdl import * | |
def twiddler(sig_in, sig_out, clock, reset): | |
concat_sig_in = ConcatSignal(sig_in(5, 0), intbv(0)[5:]) | |
@always_seq(clock.posedge, reset=reset) | |
def twiddle(): | |
sig_out.next = concat_sig_in.signed() |
OlderNewer