Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
sylefeb committed Nov 8, 2023
2 parents baaf921 + ea178f5 commit c66233d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
message(FATAL_ERROR "Silice requires g++ 8 at least")
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=format -Werror=format-security")
endif()


set(STD_FS_LIB "")
# ==== The test below is based on https://github.com/pybind/pybind11/blob/master/tests/CMakeLists.txt
# It is under a BSD-style license, see https://github.com/pybind/pybind11/blob/master/LICENSE
Expand Down
6 changes: 6 additions & 0 deletions projects/common/ddr_clock.v
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// SL 2021-12-12
// produces an inverted clock of same frequency through DDR primitives

`ifndef DDR_CLOCK
`define DDR_CLOCK

module ddr_clock(
input clock,
input enable,
Expand Down Expand Up @@ -54,3 +58,5 @@ end
`endif

endmodule

`endif
6 changes: 6 additions & 0 deletions projects/sdram_memtest/sdram_memtest.si
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ $$if false then
sio.data_in = 0;
sio.in_valid = 1;
while (!sio.done) { }
$$if SIMULATION then
__display("sio.data_out = %h",sio.data_out);
$$end
leds = sio.data_out[56,8];
$$end

Expand Down Expand Up @@ -289,12 +291,16 @@ $$if true then
$$if TEST_r128w8 or TEST_r16w16 then
if (sio.data_out[0,8] != count[0,8]) {
leds = 8b01010101;
$$if SIMULATION then
__display("ERROR AT %h",count);
$$end
}
$$else
if (sio.data_out[0,64] != (64h1122aabbccddeeff ^ count ^ (count<<32))) {
leds = 8b01010101;
$$if SIMULATION then
__display("ERROR AT %h",count);
$$end
}
$$end
$$if SIMULATION then
Expand Down
2 changes: 1 addition & 1 deletion projects/tinygpus
4 changes: 2 additions & 2 deletions src/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6326,7 +6326,7 @@ void Algorithm::checkExpressions(const t_instantiation_context &ictx,antlr4::tre
if (A != m_InstancedBlueprints.end()) { // algorithm?
Algorithm *alg = dynamic_cast<Algorithm*>(A->second.blueprint.raw());
if (alg == nullptr) {
reportError(sourceloc(async), "called instance '%s' is not an algorithm", async->IDENTIFIER()->getText().c_str());
reportError(sourceloc(sync), "called instance '%s' is not an algorithm", sync->joinExec()->IDENTIFIER()->getText().c_str());
} else {
// if parameters are given, check, otherwise we allow call without parameters (bindings may exist)
if (!sync->callParamList()->expression_0().empty()) {
Expand Down Expand Up @@ -6364,7 +6364,7 @@ void Algorithm::checkExpressions(const t_instantiation_context &ictx,antlr4::tre
if (A != m_InstancedBlueprints.end()) { // algorithm?
Algorithm *alg = dynamic_cast<Algorithm*>(A->second.blueprint.raw());
if (alg == nullptr) {
reportError(sourceloc(async), "joined instance '%s' is not an algorithm", async->IDENTIFIER()->getText().c_str());
reportError(sourceloc(join), "joined instance '%s' is not an algorithm", join->IDENTIFIER()->getText().c_str());
} else {
// if parameters are given, check, otherwise we allow call without parameters (bindings may exist)
if (!join->callParamList()->expression_0().empty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/LuaPreProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ void LuaPreProcessor::decomposeSource(
if (w == "unit" || w == "algorithm" || w == "algorithm#" || w == "circuitry") {
std::string name = parser.readString("( \t\r");
if (name.empty()) {
throw Fatal((w + " has no name").c_str()); // TODO: improve error report (line)
throw Fatal("%s",(w + " has no name").c_str()); // TODO: improve error report (line)
}
cerr << "functionalizing " << w << ' ' << name << '\n';
if (w == "algorithm#") {
Expand Down

0 comments on commit c66233d

Please sign in to comment.