forked from M-Labs/nix-scripts
Compare commits
No commits in common. "b332d72c5e62c47fa02f5f2f1ecba4013706f14b" and "17560a1a1c857f6d1e5d2e4278bc7209d938f733" have entirely different histories.
b332d72c5e
...
17560a1a1c
@ -58,12 +58,12 @@ in
|
|||||||
src = <mirnySrc>;
|
src = <mirnySrc>;
|
||||||
};
|
};
|
||||||
mirny-cpld-release = buildMirnyCpld rec {
|
mirny-cpld-release = buildMirnyCpld rec {
|
||||||
version = "0.3.1";
|
version = "0.3";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "quartiq";
|
owner = "quartiq";
|
||||||
repo = "mirny";
|
repo = "mirny";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-FbPUgXcUByEnczbnDCh8wYPO+rpSZSAabG1rtvA7mIs=";
|
sha256 = "sha256-u1iXcbGX6JkVgfpnCbkyTOVoMYnYcSufLBb6OBAeu8c=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mirny-cpld-legacy-almazny = buildMirnyCpld rec {
|
mirny-cpld-legacy-almazny = buildMirnyCpld rec {
|
||||||
@ -76,6 +76,16 @@ in
|
|||||||
};
|
};
|
||||||
patchPhase = "patch -p1 < ${./mirny-legacy-almazny.diff}";
|
patchPhase = "patch -p1 < ${./mirny-legacy-almazny.diff}";
|
||||||
};
|
};
|
||||||
|
mirny-cpld-almazny = buildMirnyCpld rec {
|
||||||
|
version = "0.3";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "quartiq";
|
||||||
|
repo = "mirny";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-u1iXcbGX6JkVgfpnCbkyTOVoMYnYcSufLBb6OBAeu8c=";
|
||||||
|
};
|
||||||
|
patchPhase = "patch -p1 < ${./mirny-almazny.diff}";
|
||||||
|
};
|
||||||
fastino-fpga = pkgs.stdenv.mkDerivation {
|
fastino-fpga = pkgs.stdenv.mkDerivation {
|
||||||
name = "fastino-fpga";
|
name = "fastino-fpga";
|
||||||
src = <fastinoSrc>;
|
src = <fastinoSrc>;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, isePath ? "/opt/Xilinx/14.7/ISE_DS", vivadoPath ? "/opt/Xilinx/Vivado/2022.2" }:
|
{ pkgs, isePath ? "/opt/Xilinx/14.7/ISE_DS", vivadoPath ? "/opt/Xilinx/Vivado/2021.2" }:
|
||||||
rec {
|
rec {
|
||||||
ise = let
|
ise = let
|
||||||
makeXilinxEnv = name: pkgs.buildFHSUserEnv {
|
makeXilinxEnv = name: pkgs.buildFHSUserEnv {
|
||||||
|
40
gluelogic/mirny-almazny.diff
Normal file
40
gluelogic/mirny-almazny.diff
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
diff --git a/mirny.py b/mirny.py
|
||||||
|
index 6c041de..73991b1 100644
|
||||||
|
--- a/mirny.py
|
||||||
|
+++ b/mirny.py
|
||||||
|
@@ -135,7 +135,7 @@ class SR(Module):
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
|
- def connect_ext(self, ext, adr, mask):
|
||||||
|
+ def connect_ext(self, ext, adr, mask, sdi_passthrough=False):
|
||||||
|
adr &= mask
|
||||||
|
self._check_intersection(adr, mask)
|
||||||
|
self._slaves.append((ext, adr, mask))
|
||||||
|
@@ -146,12 +146,16 @@ class SR(Module):
|
||||||
|
stb.ce.eq(self.bus.re),
|
||||||
|
# don't glitch with &stb.o
|
||||||
|
ext.sck.eq(self.ext.sck),
|
||||||
|
- ext.sdi.eq(self.ext.sdi & stb.o),
|
||||||
|
ext.cs.eq(stb.o),
|
||||||
|
If(stb.o,
|
||||||
|
self.ext.sdo.eq(ext.sdo),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
+ # Almazny shares one SDI with 4 devices, it cannot be masked by stb
|
||||||
|
+ if sdi_passthrough:
|
||||||
|
+ self.comb += ext.sdi.eq(self.ext.sdi)
|
||||||
|
+ else:
|
||||||
|
+ self.comb += ext.sdi.eq(self.ext.sdi & stb.o),
|
||||||
|
|
||||||
|
|
||||||
|
def intersection(a, b):
|
||||||
|
@@ -360,7 +364,7 @@ class Mirny(Module):
|
||||||
|
]
|
||||||
|
|
||||||
|
ext = Record(ext_layout)
|
||||||
|
- self.sr.connect_ext(ext, adr=i + 12, mask=mask)
|
||||||
|
+ self.sr.connect_ext(ext, adr=i + 12, mask=mask, sdi_passthrough=True)
|
||||||
|
self.comb += [
|
||||||
|
mezz[i + 3].oe.eq(1),
|
||||||
|
mezz[i + 3].o.eq(~ext.cs), # Almazny REG_LATCH
|
@ -8,8 +8,8 @@ let
|
|||||||
"thumbv7em-none-eabihf"
|
"thumbv7em-none-eabihf"
|
||||||
];
|
];
|
||||||
rustManifest = pkgs.fetchurl {
|
rustManifest = pkgs.fetchurl {
|
||||||
url = "https://static.rust-lang.org/dist/2024-06-13/channel-rust-stable.toml";
|
url = "https://static.rust-lang.org/dist/2023-12-07/channel-rust-stable.toml";
|
||||||
sha256 = "sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=";
|
sha256 = "sha256-PjvuouwTsYfNKW5Vi5Ye7y+lL7SsWGBxCtBOOm2z14c=";
|
||||||
};
|
};
|
||||||
rustChannelOfTargets = _channel: _date: targets:
|
rustChannelOfTargets = _channel: _date: targets:
|
||||||
(pkgs.lib.rustLib.fromManifestFile rustManifest {
|
(pkgs.lib.rustLib.fromManifestFile rustManifest {
|
||||||
|
5
web.nix
5
web.nix
@ -5,11 +5,6 @@ let
|
|||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
web = pkgs.runCommand "web" {} "cd ${web-src}; ${pkgs.zola}/bin/zola build -o $out";
|
web = pkgs.runCommand "web" {} "cd ${web-src}; ${pkgs.zola}/bin/zola build -o $out";
|
||||||
web-intl = pkgs.runCommand "web-intl" {}
|
|
||||||
''
|
|
||||||
cd ${web-src}
|
|
||||||
DOMAINNAME=m-labs.hk ${pkgs.zola}/bin/zola build -o $out
|
|
||||||
'';
|
|
||||||
sphinxcontrib-platformpicker = pkgs.python3Packages.buildPythonPackage rec {
|
sphinxcontrib-platformpicker = pkgs.python3Packages.buildPythonPackage rec {
|
||||||
pname = "sphinxcontrib-platformpicker";
|
pname = "sphinxcontrib-platformpicker";
|
||||||
version = "1.3";
|
version = "1.3";
|
||||||
|
Loading…
Reference in New Issue
Block a user