From cb9bef43a5556df70d49adf041030a4db8c6bed5 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 4 Mar 2014 10:44:23 +0100 Subject: [PATCH] Support of the .vh file extension for SystemVerilog --- lib/linguist/languages.yml | 1 + samples/SystemVerilog/util.vh | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 samples/SystemVerilog/util.vh diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9b62cb7a..5124e2b8 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1660,6 +1660,7 @@ SystemVerilog: primary_extension: .sv extensions: - .svh + - .vh TOML: type: data diff --git a/samples/SystemVerilog/util.vh b/samples/SystemVerilog/util.vh new file mode 100644 index 00000000..d7c510b3 --- /dev/null +++ b/samples/SystemVerilog/util.vh @@ -0,0 +1,8 @@ +function integer log2; + input integer x; + begin + x = x-1; + for (log2 = 0; x > 0; log2 = log2 + 1) + x = x >> 1; + end +endfunction