Merge remote-tracking branch 'origin/master' into eddie/xilinx_srl

This commit is contained in:
Eddie Hung 2019-08-23 11:32:44 -07:00
commit 78b7d8f531
9 changed files with 43 additions and 20 deletions

View File

@ -6,3 +6,4 @@ brew "git"
brew "graphviz" brew "graphviz"
brew "pkg-config" brew "pkg-config"
brew "python3" brew "python3"
brew "tcl-tk"

View File

@ -91,8 +91,10 @@ PLUGIN_LDFLAGS += -undefined dynamic_lookup
ifneq ($(shell which brew),) ifneq ($(shell which brew),)
BREW_PREFIX := $(shell brew --prefix)/opt BREW_PREFIX := $(shell brew --prefix)/opt
$(info $$BREW_PREFIX is [${BREW_PREFIX}]) $(info $$BREW_PREFIX is [${BREW_PREFIX}])
ifeq ($(ENABLE_PYOSYS),1)
CXXFLAGS += -I$(BREW_PREFIX)/boost/include/boost CXXFLAGS += -I$(BREW_PREFIX)/boost/include/boost
LDFLAGS += -L$(BREW_PREFIX)/boost/lib LDFLAGS += -L$(BREW_PREFIX)/boost/lib
endif
CXXFLAGS += -I$(BREW_PREFIX)/readline/include CXXFLAGS += -I$(BREW_PREFIX)/readline/include
LDFLAGS += -L$(BREW_PREFIX)/readline/lib LDFLAGS += -L$(BREW_PREFIX)/readline/lib
PKG_CONFIG_PATH := $(BREW_PREFIX)/libffi/lib/pkgconfig:$(PKG_CONFIG_PATH) PKG_CONFIG_PATH := $(BREW_PREFIX)/libffi/lib/pkgconfig:$(PKG_CONFIG_PATH)

View File

@ -69,11 +69,14 @@ prerequisites for building yosys:
graphviz xdot pkg-config python3 libboost-system-dev \ graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
Similarily, on Mac OS X MacPorts or Homebrew can be used to install dependencies: Similarily, on Mac OS X Homebrew can be used to install dependencies:
$ brew tap Homebrew/bundle && brew bundle $ brew tap Homebrew/bundle && brew bundle
or MacPorts:
$ sudo port install bison flex readline gawk libffi \ $ sudo port install bison flex readline gawk libffi \
git graphviz pkgconfig python36 boost zlib git graphviz pkgconfig python36 boost zlib tcl
On FreeBSD use the following command to install all prerequisites: On FreeBSD use the following command to install all prerequisites:

View File

@ -151,6 +151,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
reg->is_reg = true; reg->is_reg = true;
reg->is_signed = node->is_signed; reg->is_signed = node->is_signed;
for (auto &it : node->attributes) for (auto &it : node->attributes)
if (it.first != ID(mem2reg))
reg->attributes.emplace(it.first, it.second->clone()); reg->attributes.emplace(it.first, it.second->clone());
reg->filename = node->filename; reg->filename = node->filename;
reg->linenum = node->linenum; reg->linenum = node->linenum;

View File

@ -532,10 +532,10 @@ struct EquivMakePass : public Pass {
log_cmd_error("Equiv module %s already exists.\n", args[argidx+2].c_str()); log_cmd_error("Equiv module %s already exists.\n", args[argidx+2].c_str());
if (worker.gold_mod->has_memories() || worker.gold_mod->has_processes()) if (worker.gold_mod->has_memories() || worker.gold_mod->has_processes())
log_cmd_error("Gold module contains memories or procresses. Run 'memory' or 'proc' respectively.\n"); log_cmd_error("Gold module contains memories or processes. Run 'memory' or 'proc' respectively.\n");
if (worker.gate_mod->has_memories() || worker.gate_mod->has_processes()) if (worker.gate_mod->has_memories() || worker.gate_mod->has_processes())
log_cmd_error("Gate module contains memories or procresses. Run 'memory' or 'proc' respectively.\n"); log_cmd_error("Gate module contains memories or processes. Run 'memory' or 'proc' respectively.\n");
worker.read_blacklists(); worker.read_blacklists();
worker.read_encfiles(); worker.read_encfiles();

View File

@ -17,10 +17,12 @@ endmodule
// --------------------------------------- // ---------------------------------------
(* abc_box_id=1, lib_whitebox *) (* abc_box_id=1, lib_whitebox *)
module CCU2C( module CCU2C(
(* abc_carry *) input CIN, (* abc_carry *)
input CIN,
input A0, B0, C0, D0, A1, B1, C1, D1, input A0, B0, C0, D0, A1, B1, C1, D1,
output S0, S1, output S0, S1,
(* abc_carry *) output COUT (* abc_carry *)
output COUT
); );
parameter [15:0] INIT0 = 16'h0000; parameter [15:0] INIT0 = 16'h0000;
parameter [15:0] INIT1 = 16'h0000; parameter [15:0] INIT1 = 16'h0000;
@ -109,9 +111,12 @@ endmodule
// --------------------------------------- // ---------------------------------------
//(* abc_box_id=2 *) //(* abc_box_id=2 *)
module TRELLIS_DPR16X4 ( module TRELLIS_DPR16X4 (
(* abc_scc_break *) input [3:0] DI, (* abc_scc_break *)
(* abc_scc_break *) input [3:0] WAD, input [3:0] DI,
(* abc_scc_break *) input WRE, (* abc_scc_break *)
input [3:0] WAD,
(* abc_scc_break *)
input WRE,
input WCK, input WCK,
input [3:0] RAD, input [3:0] RAD,
output [3:0] DO output [3:0] DO

View File

@ -143,11 +143,13 @@ endmodule
(* abc_box_id = 1, lib_whitebox *) (* abc_box_id = 1, lib_whitebox *)
module \$__ICE40_FULL_ADDER ( module \$__ICE40_FULL_ADDER (
(* abc_carry *) output CO, (* abc_carry *)
output CO,
output O, output O,
input A, input A,
input B, input B,
(* abc_carry *) input CI (* abc_carry *)
input CI
); );
SB_CARRY carry ( SB_CARRY carry (
.I0(A), .I0(A),

View File

@ -183,9 +183,11 @@ endmodule
(* abc_box_id = 4, lib_whitebox *) (* abc_box_id = 4, lib_whitebox *)
module CARRY4( module CARRY4(
(* abc_carry *) output [3:0] CO, (* abc_carry *)
output [3:0] CO,
output [3:0] O, output [3:0] O,
(* abc_carry *) input CI, (* abc_carry *)
input CI,
input CYINIT, input CYINIT,
input [3:0] DI, S input [3:0] DI, S
); );
@ -298,9 +300,11 @@ endmodule
(* abc_box_id = 5 *) (* abc_box_id = 5 *)
module RAM32X1D ( module RAM32X1D (
output DPO, SPO, output DPO, SPO,
(* abc_scc_break *) input D, (* abc_scc_break *)
input D,
input WCLK, input WCLK,
(* abc_scc_break *) input WE, (* abc_scc_break *)
input WE,
input A0, A1, A2, A3, A4, input A0, A1, A2, A3, A4,
input DPRA0, DPRA1, DPRA2, DPRA3, DPRA4 input DPRA0, DPRA1, DPRA2, DPRA3, DPRA4
); );
@ -318,9 +322,11 @@ endmodule
(* abc_box_id = 6 *) (* abc_box_id = 6 *)
module RAM64X1D ( module RAM64X1D (
output DPO, SPO, output DPO, SPO,
(* abc_scc_break *) input D, (* abc_scc_break *)
input D,
input WCLK, input WCLK,
(* abc_scc_break *) input WE, (* abc_scc_break *)
input WE,
input A0, A1, A2, A3, A4, A5, input A0, A1, A2, A3, A4, A5,
input DPRA0, DPRA1, DPRA2, DPRA3, DPRA4, DPRA5 input DPRA0, DPRA1, DPRA2, DPRA3, DPRA4, DPRA5
); );
@ -338,9 +344,11 @@ endmodule
(* abc_box_id = 7 *) (* abc_box_id = 7 *)
module RAM128X1D ( module RAM128X1D (
output DPO, SPO, output DPO, SPO,
(* abc_scc_break *) input D, (* abc_scc_break *)
input D,
input WCLK, input WCLK,
(* abc_scc_break *) input WE, (* abc_scc_break *)
input WE,
input [6:0] A, DPRA input [6:0] A, DPRA
); );
parameter INIT = 128'h0; parameter INIT = 128'h0;

View File

@ -11,3 +11,4 @@ proc
cd top cd top
select -assert-count 1 m:data1 a:src=<<EOT:4 %i select -assert-count 1 m:data1 a:src=<<EOT:4 %i
select -assert-count 2 w:data2[*] a:src=<<EOT:5 %i select -assert-count 2 w:data2[*] a:src=<<EOT:5 %i
select -assert-none a:mem2reg