diff options
| author | Udi Finkelstein <github@udifink.com> | 2018-09-18 01:27:01 +0300 | 
|---|---|---|
| committer | Udi Finkelstein <github@udifink.com> | 2018-09-18 01:27:01 +0300 | 
| commit | c693f595c53e2e40840ff40b5b5ba06767582d23 (patch) | |
| tree | de5e3f353f3222abca7186996e88cd9d635a964b /backends/json | |
| parent | f6fe73b31f6e6d8966ad4ddae860b4d79133cce2 (diff) | |
| parent | 592a82c0ad8beb6de023aa2a131aab6472f949e8 (diff) | |
| download | yosys-c693f595c53e2e40840ff40b5b5ba06767582d23.tar.gz yosys-c693f595c53e2e40840ff40b5b5ba06767582d23.tar.bz2 yosys-c693f595c53e2e40840ff40b5b5ba06767582d23.zip | |
Merge branch 'master' into pr_reg_wire_error
Diffstat (limited to 'backends/json')
| -rw-r--r-- | backends/json/json.cc | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/backends/json/json.cc b/backends/json/json.cc index d3b7077a2..f5c687981 100644 --- a/backends/json/json.cc +++ b/backends/json/json.cc @@ -93,8 +93,10 @@ struct JsonWriter  				f << get_string(param.second.decode_string());  			else if (GetSize(param.second.bits) > 32)  				f << get_string(param.second.as_string()); -			else +			else if ((param.second.flags & RTLIL::ConstFlags::CONST_FLAG_SIGNED) != 0)  				f << stringf("%d", param.second.as_int()); +			else +				f << stringf("%u", param.second.as_int());  			first = false;  		}  	} @@ -250,7 +252,7 @@ struct JsonWriter  struct JsonBackend : public Backend {  	JsonBackend() : Backend("json", "write design to a JSON file") { } -	virtual void help() +	void help() YS_OVERRIDE  	{  		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|  		log("\n"); @@ -458,7 +460,7 @@ struct JsonBackend : public Backend {  		log("format. A program processing this format must ignore all unknown fields.\n");  		log("\n");  	} -	virtual void execute(std::ostream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) +	void execute(std::ostream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE  	{  		bool aig_mode = false; @@ -482,7 +484,7 @@ struct JsonBackend : public Backend {  struct JsonPass : public Pass {  	JsonPass() : Pass("json", "write design in JSON format") { } -	virtual void help() +	void help() YS_OVERRIDE  	{  		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|  		log("\n"); @@ -499,7 +501,7 @@ struct JsonPass : public Pass {  		log("See 'help write_json' for a description of the JSON format used.\n");  		log("\n");  	} -	virtual void execute(std::vector<std::string> args, RTLIL::Design *design) +	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE  	{  		std::string filename;  		bool aig_mode = false; | 
