Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
18
Issues
18
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Platform-independent core collection
Commits
25178623
Commit
25178623
authored
Apr 04, 2023
by
sowarzan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/genrams/generic/util_pkg.sv created package for sv
parent
8e6ecc96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
util_pkg.sv
modules/genrams/generic/util_pkg.sv
+35
-0
No files found.
modules/genrams/generic/util_pkg.sv
0 → 100644
View file @
25178623
//////////////////////////////////////////////////////////////////////////////
// Title : util_pkg
// Project : PS Damper Loops
// Date : 2023-03-31
//////////////////////////////////////////////////////////////////////////////
// Schematic : https://edms.cern.ch/ui/file/1390859/2/EDA-02917-V2-0_sch.pdf
//////////////////////////////////////////////////////////////////////////////
// File : util_pkg.sv
// Author : Sebastian Owarzany
// Company : CERN
// Platform : EDA-02917-V2-0
// Standard : SystemVerilog IEEE 1800
//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2021-2022 CERN. All rights reserved.
//////////////////////////////////////////////////////////////////////////////
`ifndef
util_pkg_DONE
`define
util_pkg_DONE
package
util_pkg
;
function
integer
clogb2
;
input
[
31
:
0
]
value
;
integer
i
;
begin
clogb2
=
0
;
for
(
i
=
0
;
2
**
i
<
value
;
i
=
i
+
1
)
clogb2
=
i
+
1
;
end
endfunction
// clogb2
endpackage
// util_pkg
// Import package in the design
import
util_pkg
::*;
`endif
//
util_pkg_DONE
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment