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 HARD_BLOCKS_H 00025 #define HARD_BLOCKS_H 00026 00027 #include "types.h" 00028 00029 extern STRING_CACHE *hard_block_names; 00030 00031 extern void register_hard_blocks(); 00032 extern void deregister_hard_blocks(); 00033 extern t_model* find_hard_block(char *name); 00034 extern void define_hard_block(nnode_t *node, short type, FILE *out); 00035 extern void output_hard_blocks(FILE *out); 00036 extern int hard_block_port_size(t_model *hb, char *pname); 00037 extern enum PORTS hard_block_port_direction(t_model *hb, char *pname); 00038 extern void instantiate_hard_block(nnode_t *node, short mark, netlist_t *netlist); 00039 00040 #endif 00041