Permalink
Browse files

whitespace and indentation fixes

Replace tabstops, correct indentation according to Lattice's coding style.
This huge patch makes it harder to backport upstream fixes, but there was
already a patch which replaced almost every line in the source code. So it
was already hard :)

Signed-off-by: Michael Walle <michael@walle.cc>
  • Loading branch information...
1 parent a2ed7df commit 98dc41db089767bce00d4c6e0a473dfbd9a50e2e @mwalle mwalle committed Dec 12, 2012
Showing with 1,227 additions and 1,229 deletions.
  1. +13 −13 rtl/lm32_adder.v
  2. +13 −13 rtl/lm32_addsub.v
  3. +378 −377 rtl/lm32_cpu.v
  4. +110 −110 rtl/lm32_dcache.v
  5. +28 −28 rtl/lm32_debug.v
  6. +54 −54 rtl/lm32_decoder.v
  7. +12 −12 rtl/lm32_dp_ram.v
  8. +91 −91 rtl/lm32_icache.v
  9. +109 −109 rtl/lm32_instruction_unit.v
  10. +21 −21 rtl/lm32_interrupt.v
  11. +38 −38 rtl/lm32_jtag.v
  12. +124 −126 rtl/lm32_load_store_unit.v
  13. +5 −5 rtl/lm32_logic_op.v
  14. +19 −19 rtl/lm32_mc_arithmetic.v
  15. +12 −12 rtl/lm32_multiplier.v
  16. +140 −140 rtl/lm32_multiplier_spartan6.v
  17. +20 −21 rtl/lm32_ram.v
  18. +10 −10 rtl/lm32_shifter.v
  19. +30 −30 rtl/lm32_top.v
View
@@ -2,7 +2,7 @@
// >>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
// ------------------------------------------------------------------
// Copyright (c) 2006-2011 by Lattice Semiconductor Corporation
-// ALL RIGHTS RESERVED
+// ALL RIGHTS RESERVED
// ------------------------------------------------------------------
//
// IMPORTANT: THIS FILE IS AUTO-GENERATED BY THE LATTICEMICO SYSTEM.
@@ -11,7 +11,7 @@
//
// Lattice Semiconductor grants permission to use this code
// pursuant to the terms of the Lattice Semiconductor Corporation
-// Open Source License Agreement.
+// Open Source License Agreement.
//
// Disclaimer:
//
@@ -37,7 +37,7 @@
// FILE DETAILS
// Project : LatticeMico32
// File : lm32_adder.v
-// Title : Integer adder / subtractor with comparison flag generation
+// Title : Integer adder / subtractor with comparison flag generation
// Dependencies : lm32_include.v
// Version : 6.1.17
// : Initial Release
@@ -84,27 +84,27 @@ output adder_carry_n_x; // Inverted carry
wire adder_carry_n_x;
output adder_overflow_x; // Indicates if overflow occured, only valid for subtractions
reg adder_overflow_x;
-
+
/////////////////////////////////////////////////////
-// Internal nets and registers
+// Internal nets and registers
/////////////////////////////////////////////////////
wire a_sign; // Sign (i.e. positive or negative) of operand 0
wire b_sign; // Sign of operand 1
wire result_sign; // Sign of result
/////////////////////////////////////////////////////
-// Instantiations
+// Instantiations
/////////////////////////////////////////////////////
lm32_addsub addsub (
// ----- Inputs -----
- .DataA (operand_0_x),
- .DataB (operand_1_x),
- .Cin (adder_op_x),
- .Add_Sub (adder_op_x_n),
+ .DataA (operand_0_x),
+ .DataB (operand_1_x),
+ .Cin (adder_op_x),
+ .Add_Sub (adder_op_x_n),
// ----- Ouputs -----
- .Result (adder_result_x),
+ .Result (adder_result_x),
.Cout (adder_carry_n_x)
);
@@ -121,7 +121,7 @@ assign result_sign = adder_result_x[`LM32_WORD_WIDTH-1];
// Determine whether an overflow occured when performing a subtraction
always @(*)
-begin
+begin
// +ve - -ve = -ve -> overflow
// -ve - +ve = +ve -> overflow
if ( (!a_sign & b_sign & result_sign)
@@ -131,6 +131,6 @@ begin
else
adder_overflow_x = `FALSE;
end
-
+
endmodule
View
@@ -2,7 +2,7 @@
// >>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
// ------------------------------------------------------------------
// Copyright (c) 2006-2011 by Lattice Semiconductor Corporation
-// ALL RIGHTS RESERVED
+// ALL RIGHTS RESERVED
// ------------------------------------------------------------------
//
// IMPORTANT: THIS FILE IS AUTO-GENERATED BY THE LATTICEMICO SYSTEM.
@@ -11,7 +11,7 @@
//
// Lattice Semiconductor grants permission to use this code
// pursuant to the terms of the Lattice Semiconductor Corporation
-// Open Source License Agreement.
+// Open Source License Agreement.
//
// Disclaimer:
//
@@ -54,12 +54,12 @@
module lm32_addsub (
// ----- Inputs -------
- DataA,
- DataB,
- Cin,
- Add_Sub,
+ DataA,
+ DataB,
+ Cin,
+ Add_Sub,
// ----- Outputs -------
- Result,
+ Result,
Cout
);
@@ -83,13 +83,13 @@ wire Cout;
/////////////////////////////////////////////////////
// Instantiations
-/////////////////////////////////////////////////////
+/////////////////////////////////////////////////////
// Modified for Milkymist: removed non-portable instantiated block
- wire [32:0] tmp_addResult = DataA + DataB + Cin;
- wire [32:0] tmp_subResult = DataA - DataB - !Cin;
-
- assign Result = (Add_Sub == 1) ? tmp_addResult[31:0] : tmp_subResult[31:0];
- assign Cout = (Add_Sub == 1) ? tmp_addResult[32] : !tmp_subResult[32];
+wire [32:0] tmp_addResult = DataA + DataB + Cin;
+wire [32:0] tmp_subResult = DataA - DataB - !Cin;
+
+assign Result = (Add_Sub == 1) ? tmp_addResult[31:0] : tmp_subResult[31:0];
+assign Cout = (Add_Sub == 1) ? tmp_addResult[32] : !tmp_subResult[32];
endmodule
Oops, something went wrong.

0 comments on commit 98dc41d

Please sign in to comment.