BranchPredictor.py (13957:25e9c77a8a99) BranchPredictor.py (14034:937e704c6807)
1# Copyright (c) 2012 Mark D. Hill and David A. Wood
2# Copyright (c) 2015 The University of Wisconsin
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;

--- 461 unchanged lines hidden (view full) ---

470class TAGE_SC_L_8KB(TAGE_SC_L):
471 type = 'TAGE_SC_L_8KB'
472 cxx_class = 'TAGE_SC_L_8KB'
473 cxx_header = "cpu/pred/tage_sc_l_8KB.hh"
474
475 tage = TAGE_SC_L_TAGE_8KB()
476 loop_predictor = TAGE_SC_L_8KB_LoopPredictor()
477 statistical_corrector = TAGE_SC_L_8KB_StatisticalCorrector()
1# Copyright (c) 2012 Mark D. Hill and David A. Wood
2# Copyright (c) 2015 The University of Wisconsin
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;

--- 461 unchanged lines hidden (view full) ---

470class TAGE_SC_L_8KB(TAGE_SC_L):
471 type = 'TAGE_SC_L_8KB'
472 cxx_class = 'TAGE_SC_L_8KB'
473 cxx_header = "cpu/pred/tage_sc_l_8KB.hh"
474
475 tage = TAGE_SC_L_TAGE_8KB()
476 loop_predictor = TAGE_SC_L_8KB_LoopPredictor()
477 statistical_corrector = TAGE_SC_L_8KB_StatisticalCorrector()
478
479class MultiperspectivePerceptron(BranchPredictor):
480 type = 'MultiperspectivePerceptron'
481 cxx_class = 'MultiperspectivePerceptron'
482 cxx_header = 'cpu/pred/multiperspective_perceptron.hh'
483 abstract = True
484
485 num_filter_entries = Param.Int("Number of filter entries")
486 num_local_histories = Param.Int("Number of local history entries")
487 local_history_length = Param.Int(11,
488 "Length in bits of each history entry")
489
490 block_size = Param.Int(21,
491 "number of ghist bits in a 'block'; this is the width of an initial "
492 "hash of ghist")
493 pcshift = Param.Int(-10, "Shift for hashing PC")
494 threshold = Param.Int(1, "Threshold for deciding low/high confidence")
495 bias0 = Param.Int(-5,
496 "Bias perceptron output this much on all-bits-zero local history")
497 bias1 = Param.Int(5,
498 "Bias perceptron output this much on all-bits-one local history")
499 biasmostly0 = Param.Int(-1,
500 "Bias perceptron output this much on almost-all-bits-zero local "
501 "history")
502 biasmostly1 = Param.Int(1,
503 "Bias perceptron output this much on almost-all-bits-one local "
504 "history")
505 nbest = Param.Int(20,
506 "Use this many of the top performing tables on a low-confidence "
507 "branch")
508 tunebits = Param.Int(24, "Number of bits in misprediction counters")
509 hshift = Param.Int(-6,
510 "How much to shift initial feauture hash before XORing with PC bits")
511 imli_mask1 = Param.UInt64(
512 "Which tables should have their indices hashed with the first IMLI "
513 "counter")
514 imli_mask4 = Param.UInt64(
515 "Which tables should have their indices hashed with the fourth IMLI "
516 "counter")
517 recencypos_mask = Param.UInt64(
518 "Which tables should have their indices hashed with the recency "
519 "position")
520 fudge = Param.Float(0.245, "Fudge factor to multiply by perceptron output")
521 n_sign_bits = Param.Int(2, "Number of sign bits per magnitude")
522 pcbit = Param.Int(2, "Bit from the PC to use for hashing global history")
523 decay = Param.Int(0, "Whether and how often to decay a random weight")
524 record_mask = Param.Int(191,
525 "Which histories are updated with filtered branch outcomes")
526 hash_taken = Param.Bool(False,
527 "Hash the taken/not taken value with a PC bit")
528 tuneonly = Param.Bool(True,
529 "If true, only count mispredictions of low-confidence branches")
530 extra_rounds = Param.Int(1,
531 "Number of extra rounds of training a single weight on a "
532 "low-confidence prediction")
533 speed = Param.Int(9, "Adaptive theta learning speed")
534 initial_theta = Param.Int(10, "Initial theta")
535 budgetbits = Param.Int("Hardware budget in bits")
536 speculative_update = Param.Bool(False,
537 "Use speculative update for histories")
538
539class MultiperspectivePerceptron8KB(MultiperspectivePerceptron):
540 type = 'MultiperspectivePerceptron8KB'
541 cxx_class = 'MultiperspectivePerceptron8KB'
542 cxx_header = 'cpu/pred/multiperspective_perceptron_8KB.hh'
543 budgetbits = 8192 * 8 + 2048
544 num_local_histories = 48
545 num_filter_entries = 0
546 imli_mask1 = 0x6
547 imli_mask4 = 0x4400
548 recencypos_mask = 0x100000090
549
550class MultiperspectivePerceptron64KB(MultiperspectivePerceptron):
551 type = 'MultiperspectivePerceptron64KB'
552 cxx_class = 'MultiperspectivePerceptron64KB'
553 cxx_header = 'cpu/pred/multiperspective_perceptron_64KB.hh'
554 budgetbits = 65536 * 8 + 2048
555 num_local_histories = 510
556 num_filter_entries = 18025
557 imli_mask1 = 0xc1000
558 imli_mask4 = 0x80008000
559 recencypos_mask = 0x100000090