Achronix Speedster22i User Macro Guide Manuale Utente Pagina 104

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 224
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 103
Arithmetic Functions ALU
Speedster Macro Cell Library
www.achronix.com PAGE 87
Parameters
Table 5-2: Parameters
Parameter Defined Values Default Value
invert_b 1’b0
invert_b
Theinvert_bparameterdefinesiftheALUfunctionsasanadderorasubtractor.Settingthe
invert_bparameterto1’b0configurestheALUtoperformtwo’scomplementadditionofa[1:0]
+b[1:0]+cin.Settingtheinvert_bparameter to1’b1configurestheALUtoinverttheb[1:0]
inputsothatthetw
o’scomplementsubtractionofa[1:0]‐b[1:0]isperformed.Notethatwhen
subtractionsisdesired,thecininputmustbetiedhigh.WhenmultipleALUsareconnectedto
perform higher resolutionsubtractors,onlythecin of the LSB of the subtractor is tobe tied
high.
Table 5-3: Function Table When invert_b = 1’b0.
load cin s[1:0] Note
1 X d[1:0] Load
0 - a[1:0] + b[1:0] + cin Add
Table 5-4: Function Table When invert_b = 1’b1.
load cin s[1:0] Note
1 X d[1:0] Load
0 1 a[1:0] - b[1:0] Subtract
0 0 a[1:0] - b[1:0] - 1 Subtract - 1
Verilog Instantiation Template
ALU #(.invert_b(1’b0))
instance_name(.a(user_a),
.b(user_b),
.d(user_load_value),
.load(user_load),
.cin(user_carry_in),
.s(user_sum),
.cout(user_cout));
1’b0, 1’b1
Vedere la pagina 103
1 2 ... 99 100 101 102 103 104 105 106 107 108 109 ... 223 224

Commenti su questo manuale

Nessun commento