config.py: Only run constructor once
config.py: Remove call to add_cores_root from constructor
sections.py: Always define include_dirs in VerilatorSection
sections.py: Add __str__ function for sections
core.py: Only create verilator object if there is a section
sections.py: Make VerilatorSection buildable

This is to prepare for coming changes in verilator.py that will
only load a single .a file from each core instead of loading the object
files
verilator.py: Load archives from cores instead of building directly
sections.py: Make systemC test benches buildable again

The refactoring done to build archives from verilator sections
broke systemC test benches. This should fix it again
verilator.py: Allow src_files in top-level core and use pyhon which

This fixes a bug where src_files were not allowed in the top-level
core. It also removes the need to call the external 'which' command
and instead uses a python implementation copied from twisted

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
utils: add colored print functions

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
fusesoc.in: use new colorized print functions

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
utils: add helpers for finding verilator and VERILATOR_ROOT

find_verilator code is factored out from verilator.py.
get_verilator_root relies on the fact that verilator will print
the hardcoded value for VERILATOR_ROOT when fed '-V' as an
argument.
verilator: use find_verilator() helper
sections: use get_verilator_root to obtain VERILATOR_ROOT
fusesoc.in: Change error string formatting

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
fusesoc.in: catch exception on configure and add_cores_root

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
provider: raise exception on unknown/missing provider

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
provider: url/opencores raise exception on _checkout errors

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Improve error output printing style

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
sections: add src_root to verilator build include

This solves a problem with inter-core dependencies,
where header files have to be shared between cores.
Doing it this way, cores can include files from other cores by:
#include <other-core/file.h>

The alternative would be for each core to export an include
path, but this might result in namespace clashes between include
files from different cores. Plus, it would be messier to
implement in fusesoc.