diff options
-rw-r--r-- | .github/workflows/deprecated.yml | 21 | ||||
-rw-r--r-- | .github/workflows/test-linux.yml | 14 | ||||
-rw-r--r-- | CHANGELOG | 11 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | kernel/fstdata.cc | 28 |
5 files changed, 53 insertions, 23 deletions
diff --git a/.github/workflows/deprecated.yml b/.github/workflows/deprecated.yml new file mode 100644 index 000000000..073b9ded3 --- /dev/null +++ b/.github/workflows/deprecated.yml @@ -0,0 +1,21 @@ +name: Deprecated compilers + +on: [push, pull_request] + +jobs: + gcc48: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build GCC 4.8 + run: | + docker run --rm -v $(pwd):/work yosyshq/deprecated-compilers:1.0 make config-gcc-4.8 + docker run --rm -v $(pwd):/work yosyshq/deprecated-compilers:1.0 make -j8 + + clang39: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build Clang 3.9 + run: | + docker run --rm -v $(pwd):/work yosyshq/deprecated-compilers:1.0 make CC=clang-3.9 CXX=clang-3.9 LD=clang-3.9 -j8 diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index b974757c4..eee556794 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -25,12 +25,6 @@ jobs: - os: { id: ubuntu-20.04, name: focal } compiler: 'gcc-10' cpp_std: 'c++11' - - os: { id: ubuntu-18.04, name: bionic } - compiler: 'clang-3.9' - cpp_std: 'c++11' - - os: { id: ubuntu-18.04, name: bionic } - compiler: 'gcc-4.8' - cpp_std: 'c++11' fail-fast: false steps: - name: Install Dependencies @@ -109,15 +103,7 @@ jobs: make -j${{ env.procs }} make install - - name: Build yosys (gcc-4.8) - if: matrix.compiler == 'gcc-4.8' - shell: bash - run: | - make config-${{ matrix.compiler }} - make -j${{ env.procs }} CCXXSTD=${{ matrix.cpp_std }} CC=$CC CXX=$CC LD=$CC - - name: Build yosys - if: matrix.compiler != 'gcc-4.8' shell: bash run: | make config-${CC%%-*} @@ -4,7 +4,18 @@ List of major changes and improvements between releases Yosys 0.22 .. Yosys 0.22-dev -------------------------- + * New commands and options + - Added option "-cross" to "miter" pass. + - Added option "-nocheck" to "equiv_opt" pass. + + * Verific support + - Added support for reading Liberty files using Verific library. + (Optinally enabled with ENABLE_VERIFIC_LIBERTY) + - Added option "-cells" to "verific -import" enabling import of + all cells from verific design. + * Various + - MinGW build (Windows) plugin support - Added YOSYS_ABORT_ON_LOG_ERROR environment variable for debugging. Setting it to 1 causes abort() to be called when Yosys terminates with an error message. @@ -142,7 +142,7 @@ LDLIBS += -lrt endif endif -YOSYS_VER := 0.22+70 +YOSYS_VER := 0.22+72 # Note: We arrange for .gitcommit to contain the (short) commit hash in # tarballs generated with git-archive(1) using .gitattributes. The git repo diff --git a/kernel/fstdata.cc b/kernel/fstdata.cc index b2e574b02..1b8043f9a 100644 --- a/kernel/fstdata.cc +++ b/kernel/fstdata.cc @@ -78,7 +78,18 @@ uint64_t FstData::getStartTime() { return fstReaderGetStartTime(ctx); } uint64_t FstData::getEndTime() { return fstReaderGetEndTime(ctx); } +static void normalize_brackets(std::string &str) +{ + for (auto &c : str) { + if (c == '<') + c = '['; + else if (c == '>') + c = ']'; + } +} + fstHandle FstData::getHandle(std::string name) { + normalize_brackets(name); if (name_to_handle.find(name) != name_to_handle.end()) return name_to_handle[name]; else @@ -120,6 +131,7 @@ void FstData::extractVarNames() var.is_reg = (fstVarType)h->u.var.typ == FST_VT_VCD_REG; var.name = remove_spaces(h->u.var.name); var.scope = fst_scope_name; + normalize_brackets(var.scope); var.width = h->u.var.length; vars.push_back(var); if (!var.is_alias) @@ -134,35 +146,34 @@ void FstData::extractVarNames() if (clean_name[0]=='\\') clean_name = clean_name.substr(1); size_t pos = clean_name.find_last_of("<"); - if (pos != std::string::npos) { + if (pos != std::string::npos && clean_name.back() == '>') { std::string mem_cell = clean_name.substr(0, pos); + normalize_brackets(mem_cell); std::string addr = clean_name.substr(pos+1); addr.pop_back(); // remove closing bracket char *endptr; int mem_addr = strtol(addr.c_str(), &endptr, 16); if (*endptr) { - log_warning("Error parsing memory address in : %s\n", clean_name.c_str()); + log_debug("Error parsing memory address in : %s\n", clean_name.c_str()); } else { memory_to_handle[var.scope+"."+mem_cell][mem_addr] = var.id; - name_to_handle[stringf("%s.%s[%d]",var.scope.c_str(),mem_cell.c_str(),mem_addr)] = h->u.var.handle; - continue; } } pos = clean_name.find_last_of("["); - if (pos != std::string::npos) { + if (pos != std::string::npos && clean_name.back() == ']') { std::string mem_cell = clean_name.substr(0, pos); + normalize_brackets(mem_cell); std::string addr = clean_name.substr(pos+1); addr.pop_back(); // remove closing bracket char *endptr; int mem_addr = strtol(addr.c_str(), &endptr, 10); if (*endptr) { - log_warning("Error parsing memory address in : %s\n", clean_name.c_str()); + log_debug("Error parsing memory address in : %s\n", clean_name.c_str()); } else { memory_to_handle[var.scope+"."+mem_cell][mem_addr] = var.id; - name_to_handle[stringf("%s.%s[%d]",var.scope.c_str(),mem_cell.c_str(),mem_addr)] = h->u.var.handle; - continue; } } + normalize_brackets(clean_name); name_to_handle[var.scope+"."+clean_name] = h->u.var.handle; break; } @@ -241,6 +252,7 @@ void FstData::reconstructAllAtTimes(std::vector<fstHandle> &signal, uint64_t sta past_data = last_data; callback(last_time); } + past_data = last_data; callback(end_time); } |