@@ -464,7 +464,9 @@ struct SynthRapidSiliconPass : public ScriptPass {
464
464
465
465
// Special cells
466
466
//
467
- dict<std::string, pair<int , int >> pp_memories;
467
+ dict<std::string, pair<int , int >> pp_memories; // pair is width and depth
468
+ dict<std::string, string> pp_memories_prop; // property like "dissolved", "rom"
469
+
468
470
469
471
// Alias between same signals (for I_BUF/CLK_BUF)
470
472
//
@@ -4208,10 +4210,15 @@ static void show_sig(const RTLIL::SigSpec &sig)
4208
4210
}
4209
4211
4210
4212
json_file << " {\n " ;
4211
- std::string name = it->first ;
4213
+ std::string name = ( it->first ). substr ( 1 ) ;
4212
4214
pair<int , int > wd = it->second ;
4213
4215
4214
- json_file << " \" name\" : \" " << name.substr (1 ) << " \" ,\n " ;
4216
+ json_file << " \" name\" : \" " << name << " \" ,\n " ;
4217
+
4218
+ if (pp_memories_prop.count (name)) {
4219
+ json_file << " \" type\" : \" " << pp_memories_prop[name] << " \" ,\n " ;
4220
+ }
4221
+
4215
4222
json_file << " \" width\" : \" " << wd.first << " \" ,\n " ;
4216
4223
json_file << " \" depth\" : \" " << wd.second << " \"\n " ;
4217
4224
json_file << " }" ;
@@ -4938,6 +4945,25 @@ static void show_sig(const RTLIL::SigSpec &sig)
4938
4945
}
4939
4946
}
4940
4947
4948
+ // Scratchpad mechanism is used to extract data posted by the call to
4949
+ // "memory_map". Data give extra memory info like "dissolved", "rom".
4950
+ //
4951
+ void memoryMapAnalysis ()
4952
+ {
4953
+ dict<std::string, pair<int , int >>::iterator it;
4954
+
4955
+ for (it = pp_memories.begin (); it != pp_memories.end (); ++it) {
4956
+
4957
+ std::string mem_name = it->first ;
4958
+ string type = _design->scratchpad_get_string (mem_name);
4959
+
4960
+ if (type.size ()) {
4961
+ log (" Memory %s type : %s\n " , mem_name.c_str (), type.c_str ());
4962
+ pp_memories_prop[mem_name.substr (1 )] = type;
4963
+ }
4964
+ }
4965
+ }
4966
+
4941
4967
bool illegal_port_connection (std::set<Cell*>* set_cells){
4942
4968
bool generic_cell = false ;
4943
4969
bool i_buf = false ;
@@ -8099,6 +8125,7 @@ void collect_clocks (RTLIL::Module* module,
8099
8125
8100
8126
if (cell->type .in (ID (I_BUF_DS), ID (O_BUF_DS), ID (O_BUFT_DS), ID (O_SERDES),
8101
8127
ID (I_SERDES), ID (BOOT_CLOCK), ID (O_DELAY), ID (I_DELAY),
8128
+ ID (O_SERDES_CLK), ID (PLL),
8102
8129
ID (O_BUF), ID (O_BUFT), ID (O_DDR))) {
8103
8130
8104
8131
#if 0
@@ -8837,6 +8864,10 @@ void collect_clocks (RTLIL::Module* module,
8837
8864
8838
8865
run (" memory_map" );
8839
8866
8867
+ // To attach exra info for the netlist info json file
8868
+ //
8869
+ memoryMapAnalysis ();
8870
+
8840
8871
postProcessBrams ();
8841
8872
8842
8873
if (check_label (" map_gates" )) {
0 commit comments