Git Product home page Git Product logo

chdl's People

Contributors

cdkersey avatar rcurtin avatar stackmachinesa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chdl's Issues

verilog generation for wire types

Some wire declarations are after their use, therefore Xilinx Simulation Tool generates errors like:
ERROR: [VRFC 10-2071] __x169 is already implicitly declared on line 26 [h2_rom.v:322]

Not declaring them is fine for Xilinx tool since it will assume them as wire type.

-Wall -Wextra has tons of warnings

Suppose that I am using CHDL in something else, and I am interested in guaranteeing that the code doesn't have warnings.

This can be easily reproduced by setting CXXFLAGS="-Wall -Wextra" and typing 'make'. Here is an excerpt of the output:

g++ -Wall -Wextra -fPIC -std=c++11 -O2    -c -o hierarchy.o hierarchy.cpp
In file included from regimpl.h:5:0,
                 from hierarchy.cpp:14:
tickable.h:20:18: warning: unused parameter âcdâ [-Wunused-parameter]
tickable.h:21:18: warning: unused parameter âcdâ [-Wunused-parameter]
tickable.h:22:18: warning: unused parameter âcdâ [-Wunused-parameter]
tickable.h:23:18: warning: unused parameter âcdâ [-Wunused-parameter]
In file included from hierarchy.cpp:14:0:
regimpl.h:20:10: warning: unused parameter âcdâ [-Wunused-parameter]
hierarchy.cpp: In constructor âhierarchy::hierarchy(std::string, chdl::hpath_t)â:
hierarchy.cpp:55:10: warning: âhierarchy::nameâ will be initialized after [-Wreorder]
hierarchy.cpp:54:11: warning:   âchdl::hpath_t hierarchy::pathâ [-Wreorder]
hierarchy.cpp:21:3: warning:   when initialized here [-Wreorder]
hierarchy.cpp: In member function âvoid hierarchy::print(std::ostream&, int, unsigned int)â:
hierarchy.cpp:30:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

This bug is important because users expect their code to compile cleanly without warnings, especially upstream projects that are subject to distribution requirements for -Wall and -Wextra.

Giant Muxes Cause Unacceptable Compiler Memory Usage

A mux with 2^16 or so inputs (like a large LLRom) causes the compiler to use all of the RAM and grind to a halt. GCC doesn't know how to handle this. Figure out why (we should only be creating 16 instances of the function template; it's the call graph that gets interesting; is it trying to inline?) and find a reasonable workaround (possibly including sidestepping the issue by changing how LLRom works; plain old muxes aren't often this big).

tri-state merge seems to always increase the number of nodes, sometimes substantially.

Say we define a special mux like this:

  template <typename T> T Mux(bvec<10> sel, const vec<1024, T> &in) {
    bus<sz<T>::value> b;
    for (unsigned i = 0; i < 1024; ++i)
      b.connect(Flatten(in[i]), sel == Lit<10>(i));
    return b;
  }

and we build roms by attaching literals to the inputs. It becomes quite larger after tri-state merge, creating a network for all cases in which the bus will be driven 1 and another network for all cases in which the output will be driven 0. There should be some way to recognize these kinds of buses and leave them undisturbed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.