mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
netlist: Fix processing of TRUTHTABLES for generated files.
* also made nld_devinc.h srcclean friendly. * nld_devinc.h and lib_entries.hxx are currently not used. You can try the automated build by changing NL_AUTO_DEVICES in setup.h to 1.
This commit is contained in:
parent
7d28de60ee
commit
5d3342c837
@ -27,7 +27,7 @@ def process_entry(srcfile, name, params):
|
||||
print("// ---------------------------------------------------------------------")
|
||||
print("// Source: {}".format(srcfile))
|
||||
print("// ---------------------------------------------------------------------")
|
||||
|
||||
print("")
|
||||
p = re.sub("\+","",params)
|
||||
ps = p.split(",")
|
||||
pusage = ""
|
||||
@ -41,7 +41,8 @@ def process_entry(srcfile, name, params):
|
||||
if len(pauto) > 0:
|
||||
print("// auto connect: {}".format(pauto[2:]))
|
||||
print("#define {}(...) \\".format(name))
|
||||
print(" NET_REGISTER_DEVEXT({}, __VA_ARGS__)".format(name))
|
||||
print("\tNET_REGISTER_DEVEXT({}, __VA_ARGS__)".format(name))
|
||||
print("")
|
||||
|
||||
|
||||
def process_file(srcfile):
|
||||
@ -68,9 +69,9 @@ def process_file(srcfile):
|
||||
if m != None:
|
||||
process_entry(srcfile, m.group(1), "")
|
||||
else:
|
||||
m = re.match(r"TRUTHTABLE_START\((\w+),(\w+),(\w+),([a-zA-Z0-9_+@,]*)", ls)
|
||||
m = re.match(r"(static)*TRUTHTABLE_START\((\w+),(\w+),(\w+),([a-zA-Z0-9_+@,]*)", ls)
|
||||
if m != None:
|
||||
process_entry(srcfile, m.group(1), m.group(4))
|
||||
process_entry(srcfile, m.group(2), m.group(5))
|
||||
|
||||
src.close()
|
||||
|
||||
@ -79,7 +80,10 @@ if __name__ == '__main__':
|
||||
print('Usage:')
|
||||
print(' create_devinc files ...')
|
||||
sys.exit(0)
|
||||
|
||||
files_sorted = [];
|
||||
for argno in range(1, len(sys.argv)):
|
||||
process_file(sys.argv[argno])
|
||||
files_sorted.append(sys.argv[argno])
|
||||
files_sorted.sort();
|
||||
for entry in files_sorted:
|
||||
process_file(entry)
|
||||
|
||||
|
@ -45,7 +45,7 @@ def process_file(srcfile):
|
||||
if __name__ == '__main__':
|
||||
if (len(sys.argv) == 0):
|
||||
print('Usage:')
|
||||
print(' extract files ...')
|
||||
print(' create_lib_entries.py files...')
|
||||
sys.exit(0)
|
||||
|
||||
for argno in range(1, len(sys.argv)):
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -198,7 +198,7 @@ void parser_t::parse_netlist(const pstring &nlname)
|
||||
else if (token.is(m_tok_EXTERNAL_SOURCE))
|
||||
net_external_source();
|
||||
//else if (token.is(m_tok_TRUTHTABLE_START))
|
||||
// net_truthtable_start(nlname);
|
||||
// net_truthtable_start(nlname);
|
||||
else if (token.is(m_tok_LOCAL_LIB_ENTRY))
|
||||
{
|
||||
require_token(m_tok_paren_left);
|
||||
|
Loading…
Reference in New Issue
Block a user