1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00
oh/aes/dv/test_endian.v

33 lines
866 B
Coq
Raw Normal View History

2016-01-17 21:26:34 -05:00
/*
* Copyright 2012, Homer Hsing <homer.hsing@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
`timescale 1ns / 1ps
module test_endian;
reg [31:0] i;
initial begin
i = 32'h12345678; // big endian
#100;
$display("%h %h %h %h", i[31:24], i[23:16], i[15:8], i[7:0]);
// 12 34 56 78
$finish;
end
endmodule