00001 /* 00002 Permission is hereby granted, free of charge, to any person 00003 obtaining a copy of this software and associated documentation 00004 files (the "Software"), to deal in the Software without 00005 restriction, including without limitation the rights to use, 00006 copy, modify, merge, publish, distribute, sublicense, and/or sell 00007 copies of the Software, and to permit persons to whom the 00008 Software is furnished to do so, subject to the following 00009 conditions: 00010 00011 The above copyright notice and this permission notice shall be 00012 included in all copies or substantial portions of the Software. 00013 00014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00015 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00016 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00017 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 00018 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00019 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00020 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00021 OTHER DEALINGS IN THE SOFTWARE. 00022 */ 00023 00024 #ifndef MEMORIES_H 00025 #define MEMORIES_H 00026 00027 typedef struct s_memory 00028 { 00029 int size_d1; 00030 int size_d2; 00031 int size_addr1; 00032 int size_addr2; 00033 int size_out1; 00034 int size_out2; 00035 struct s_memory *next; 00036 } t_memory; 00037 00038 typedef struct s_memory_port_sizes 00039 { 00040 int size; 00041 char *name; 00042 } t_memory_port_sizes; 00043 00044 extern struct s_linked_vptr *sp_memory_list; 00045 extern struct s_linked_vptr *dp_memory_list; 00046 extern struct s_linked_vptr *memory_instances; 00047 extern struct s_linked_vptr *memory_port_size_list; 00048 extern int split_size; 00049 00050 extern void init_memory_distribution(); 00051 extern void report_memory_distribution(); 00052 00053 extern int get_memory_port_size(char *name); 00054 extern void split_sp_memory_depth(nnode_t *node); 00055 extern void split_dp_memory_depth(nnode_t *node); 00056 extern void split_sp_memory_width(nnode_t *node); 00057 extern void split_dp_memory_width(nnode_t *node); 00058 extern void iterate_memories(netlist_t *netlist); 00059 extern void clean_memories(); 00060 00061 #endif // MEMORIES_H 00062