StateMachine.py (9856:69bb50791e25) | StateMachine.py (9996:150338b8ba12) |
---|---|
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 446 unchanged lines hidden (view full) --- 455#endif 456 457/** \\brief constructor */ 458$c_ident::$c_ident(const Params *p) 459 : AbstractController(p) 460{ 461 m_name = "${ident}"; 462''') | 1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 446 unchanged lines hidden (view full) --- 455#endif 456 457/** \\brief constructor */ 458$c_ident::$c_ident(const Params *p) 459 : AbstractController(p) 460{ 461 m_name = "${ident}"; 462''') |
463 # 464 # max_port_rank is used to size vectors and thus should be one plus the 465 # largest port rank 466 # 467 max_port_rank = self.in_ports[0].pairs["max_port_rank"] + 1 468 code(' m_max_in_port_rank = $max_port_rank;') | 463 num_in_ports = len(self.in_ports) 464 code(' m_in_ports = $num_in_ports;') |
469 code.indent() 470 471 # 472 # After initializing the universal machine parameters, initialize the 473 # this machines config parameters. Also detemine if these configuration 474 # params include a sequencer. This information will be used later for 475 # contecting the sequencer back to the L1 cache controller. 476 # --- 622 unchanged lines hidden (view full) --- 1099 code.indent() 1100 1101 # InPorts 1102 # 1103 for port in self.in_ports: 1104 code.indent() 1105 code('// ${ident}InPort $port') 1106 if port.pairs.has_key("rank"): | 465 code.indent() 466 467 # 468 # After initializing the universal machine parameters, initialize the 469 # this machines config parameters. Also detemine if these configuration 470 # params include a sequencer. This information will be used later for 471 # contecting the sequencer back to the L1 cache controller. 472 # --- 622 unchanged lines hidden (view full) --- 1095 code.indent() 1096 1097 # InPorts 1098 # 1099 for port in self.in_ports: 1100 code.indent() 1101 code('// ${ident}InPort $port') 1102 if port.pairs.has_key("rank"): |
1107 code('m_cur_in_port_rank = ${{port.pairs["rank"]}};') | 1103 code('m_cur_in_port = ${{port.pairs["rank"]}};') |
1108 else: | 1104 else: |
1109 code('m_cur_in_port_rank = 0;') | 1105 code('m_cur_in_port = 0;') |
1110 code('${{port["c_code_in_port"]}}') 1111 code.dedent() 1112 1113 code('') 1114 1115 code.dedent() 1116 code.dedent() 1117 code(''' --- 424 unchanged lines hidden --- | 1106 code('${{port["c_code_in_port"]}}') 1107 code.dedent() 1108 1109 code('') 1110 1111 code.dedent() 1112 code.dedent() 1113 code(''' --- 424 unchanged lines hidden --- |