Compare commits
4 Commits
05974f272d
...
40eced0136
Author | SHA1 | Date |
---|---|---|
Sebastien Bourdeauducq | 40eced0136 | |
Sebastien Bourdeauducq | 86e0299200 | |
Sebastien Bourdeauducq | a19f0784d0 | |
Sebastien Bourdeauducq | 347e858ece |
|
@ -22,7 +22,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
buildBitstream = { name, src, vivadoPath ? "/home/sb/opt/Xilinx/Vivado/2018.3" }:
|
buildBitstream = { name, src, vivadoPath ? "/opt/Xilinx/Vivado/2018.3" }:
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
inherit name src;
|
inherit name src;
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
python ${./helloworld.py} > $out/top.v
|
python ${./helloworld_kintex7.py} > $out/top.v
|
||||||
|
|
||||||
cat > $out/top.xdc << EOF
|
cat > $out/top.xdc << EOF
|
||||||
set_property LOC K24 [get_ports serial_tx]
|
set_property LOC K24 [get_ports serial_tx]
|
|
@ -4,7 +4,7 @@ from nmigen.back import verilog
|
||||||
from heavycomps import uart
|
from heavycomps import uart
|
||||||
|
|
||||||
|
|
||||||
class Top:
|
class Top(Elaboratable):
|
||||||
def __init__(self, baudrate=115200):
|
def __init__(self, baudrate=115200):
|
||||||
self.baudrate = baudrate
|
self.baudrate = baudrate
|
||||||
self.clk156_p = Signal()
|
self.clk156_p = Signal()
|
|
@ -1,7 +1,7 @@
|
||||||
from nmigen import *
|
from nmigen import *
|
||||||
|
|
||||||
|
|
||||||
class RoundRobin:
|
class RoundRobin(Elaboratable):
|
||||||
def __init__(self, n):
|
def __init__(self, n):
|
||||||
self.n = n
|
self.n = n
|
||||||
self.request = Signal(n)
|
self.request = Signal(n)
|
||||||
|
|
|
@ -6,7 +6,7 @@ from nmigen.back.pysim import *
|
||||||
from heavycomps import uart
|
from heavycomps import uart
|
||||||
|
|
||||||
|
|
||||||
class Loopback:
|
class Loopback(Elaboratable):
|
||||||
def __init__(self, tuning_word=2**31):
|
def __init__(self, tuning_word=2**31):
|
||||||
self.tx = uart.RS232TX(tuning_word)
|
self.tx = uart.RS232TX(tuning_word)
|
||||||
self.rx = uart.RS232RX(tuning_word)
|
self.rx = uart.RS232RX(tuning_word)
|
||||||
|
|
|
@ -2,7 +2,7 @@ from nmigen import *
|
||||||
from nmigen.lib.cdc import MultiReg
|
from nmigen.lib.cdc import MultiReg
|
||||||
|
|
||||||
|
|
||||||
class RS232RX:
|
class RS232RX(Elaboratable):
|
||||||
def __init__(self, tuning_word):
|
def __init__(self, tuning_word):
|
||||||
self.rx = Signal()
|
self.rx = Signal()
|
||||||
self.data = Signal(8)
|
self.data = Signal(8)
|
||||||
|
@ -58,7 +58,7 @@ class RS232RX:
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
class RS232TX:
|
class RS232TX(Elaboratable):
|
||||||
def __init__(self, tuning_word):
|
def __init__(self, tuning_word):
|
||||||
self.tx = Signal(reset=1)
|
self.tx = Signal(reset=1)
|
||||||
self.data = Signal(8)
|
self.data = Signal(8)
|
||||||
|
|
Loading…
Reference in New Issue