teroshdl
Version:
Backend for terosHDL IDE
128 lines (127 loc) • 2.8 kB
JSON
{
"entity": { "name": "arith_counter_gray", "description": "" },
"generics": [
{
"name": "BITS",
"type": "positive",
"line": 37,
"direction": "",
"default_value": "",
"description": " Bit width of the counter"
},
{
"name": "INIT",
"type": "natural",
"line": 38,
"direction": "",
"default_value": "0",
"description": " Initial/reset counter value"
}
],
"ports": [
{
"name": "clk",
"type": "std_logic",
"line": 41,
"direction": "in",
"default_value": "",
"description": "",
"group": ""
},
{
"name": "rst",
"type": "std_logic",
"line": 42,
"direction": "in",
"default_value": "",
"description": " Reset to INIT value",
"group": ""
},
{
"name": "inc",
"type": "std_logic",
"line": 43,
"direction": "in",
"default_value": "",
"description": " Increment",
"group": ""
},
{
"name": "dec",
"type": "std_logic",
"line": 44,
"direction": "in",
"default_value": "'0'",
"description": " Decrement",
"group": ""
},
{
"name": "val",
"type": "std_logic_vector(BITS - 1 downto 0)",
"line": 45,
"direction": "out",
"default_value": "",
"description": " Value output",
"group": ""
},
{
"name": "cry",
"type": "std_logic",
"line": 46,
"direction": "out",
"default_value": "",
"description": " Carry output",
"group": ""
}
],
"body": {
"processes": [{ "name": "unnamed", "sens_list": "clk", "description": "" }],
"instantiations": []
},
"declarations": {
"types": [],
"signals": [
{
"name": "gray_cnt_r",
"type": "unsigned(BITS - 1 downto 0)",
"line": 73,
"description": ""
},
{
"name": "gray_cnt_nxt",
"type": "unsigned(BITS - 1 downto 0)",
"line": 74,
"description": ""
},
{ "name": "en", "type": "std_logic", "line": 76, "description": "" }
],
"constants": [
{
"name": "INIT_GRAY",
"type": "unsigned(BITS - 1 downto 0)",
"default_value": " gray_encode(INIT, BITS)",
"line": 72,
"description": ""
}
],
"functions": [
{
"name": "gray_encode",
"line": 52,
"type": "",
"arguments": "(val : natural; len : positive)",
"return": "return unsigned",
"description": ""
},
{
"name": "parity",
"line": 62,
"type": "",
"arguments": "(val : unsigned)",
"return": "return std_logic",
"description": ""
}
]
},
"info": {}
}