Merge pull request #2 from mithro/master

More fixes.
This commit is contained in:
enjoy-digital 2016-04-19 09:07:23 +02:00
commit 76bb0ef456
2 changed files with 20 additions and 5 deletions

View file

@ -101,12 +101,17 @@ make -j -C obj_dir/ -f Vdut.mk Vdut
tools.write_to_file(build_script_file, build_script_contents, force_unix=True) tools.write_to_file(build_script_file, build_script_contents, force_unix=True)
_build_tb(platform, vns, serial, os.path.join(sim_directory, "dut_tb.cpp")) _build_tb(platform, vns, serial, os.path.join(sim_directory, "dut_tb.cpp"))
p = subprocess.Popen(["bash", build_script_file], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output, _ = p.communicate()
output = output.decode('utf-8')
if p.returncode != 0:
error_messages = []
for l in output.splitlines():
if verbose or "error" in l.lower():
error_messages.append(l)
raise OSError("Subprocess failed with {}\n{}".format(p.returncode, "\n".join(error_messages)))
if verbose: if verbose:
r = subprocess.call(["bash", build_script_file]) print(output)
else:
r = subprocess.call(["bash", build_script_file], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
if r != 0:
raise OSError("Subprocess failed")
def _run_sim(build_name): def _run_sim(build_name):

View file

@ -548,6 +548,16 @@ int main(int i, char **c)
"(c) Copyright 2012-2015 Enjoy-Digital\n" "(c) Copyright 2012-2015 Enjoy-Digital\n"
"(c) Copyright 2007-2015 M-Labs Limited\n" "(c) Copyright 2007-2015 M-Labs Limited\n"
"Built "__DATE__" "__TIME__"\n"); "Built "__DATE__" "__TIME__"\n");
#ifdef __lm32__
printf("Running on lm32.\n");
#elif __or1k__
printf("Running on or1k.\n");
#elif __riscv__
printf("Running on riscv.\n");
#else
printf("Running on unknown architecture.\n");
#endif
crcbios(); crcbios();
#ifdef CSR_ETHMAC_BASE #ifdef CSR_ETHMAC_BASE
eth_init(); eth_init();