Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tc_sram: Remove 'X initialization for SimInit = "none" #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased
- `tc_sram`: Remove `'X` initialization for `SimInit = "none"`

## 0.2.4 - 2021-02-04
- Add `deprecated/pulp_clk_cells_xilinx.sv` to `Bender.yml`

Expand Down
4 changes: 3 additions & 1 deletion scripts/compile_vsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

set -e

[ ! -z "$VSIM" ] || VSIM=vsim

bender script vsim -t test -t rtl --vlog-arg="-svinputport=compat" --vlog-arg="-override_timescale 1ns/1ps" > compile.tcl
echo 'return 0' >> compile.tcl
vsim -c -do 'exit -code [source compile.tcl]'
${VSIM} -c -do 'exit -code [source compile.tcl]'
2 changes: 1 addition & 1 deletion scripts/run_vsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Andreas Kurth <[email protected]>

set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")/.." && pwd)

[ ! -z "$VSIM" ] || VSIM=vsim

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_xsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Wolfgang Roenninger <[email protected]>

set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")/.." && pwd)

VIVADO_VER="2018.2"

Expand Down
6 changes: 4 additions & 2 deletions src/rtl/tc_sram.sv
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ module tc_sram #(
// write memory array
always_ff @(posedge clk_i or negedge rst_ni) begin
if (!rst_ni) begin
for (int unsigned i = 0; i < NumWords; i++) begin
sram[i] <= init_val[i];
if (SimInit != "none") begin
for (int unsigned i = 0; i < NumWords; i++) begin
sram[i] <= init_val[i];
end
end
for (int i = 0; i < NumPorts; i++) begin
r_addr_q[i] <= {AddrWidth{1'b0}};
Expand Down