URL
https://opencores.org/ocsvn/jtag_master/jtag_master/trunk
Subversion Repositories jtag_master
Compare Revisions
- This comparison shows the changes necessary to convert path
/jtag_master
- from Rev 2 to Rev 3
- ↔ Reverse comparison
Rev 2 → Rev 3
/trunk/jtag_master/rtl/bram.vhd
0,0 → 1,30
library IEEE; |
use IEEE.STD_LOGIC_1164.ALL; |
use IEEE.NUMERIC_STD.ALL; |
|
entity RAM is |
Generic ( |
|
Wortbreite : natural := 8 |
); |
Port ( clk : in STD_LOGIC; |
Write : in STD_LOGIC; |
Awr : in STD_LOGIC_VECTOR (Addrbreite-1 downto 0); |
Ard : in STD_LOGIC_VECTOR (Addrbreite-1 downto 0); |
Din : in STD_LOGIC_VECTOR (Wortbreite-1 downto 0); |
Dout : out STD_LOGIC_VECTOR (Wortbreite-1 downto 0) |
); |
end RAM; |
|
architecture BlockRAM of RAM is |
type speicher is array(0 to (2**Addrbreite)-1) of STD_LOGIC_VECTOR(Wortbreite-1 downto 0); |
signal memory : speicher; |
begin |
process begin |
wait until rising_edge(CLK); |
if (Write='1') then |
memory(to_integer(unsigned(Awr))) <= Din; |
end if; |
Dout <= memory(to_integer(unsigned(Ard))); |
end process; |
end BlockRAM; |
/trunk/jtag_master/rtl/JTAG_Ctrl_Master.vhd
0,0 → 1,519
-- This file is part of JTAG_Master. |
-- |
-- JTAG_Master is free software: you can redistribute it and/or modify |
-- it under the terms of the GNU General Public License as published by |
-- the Free Software Foundation, either version 3 of the License, or |
-- (at your option) any later version. |
-- |
-- JTAG_Master is distributed in the hope that it will be useful, |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-- GNU General Public License for more details. |
-- |
-- You should have received a copy of the GNU General Public License |
-- along with JTAG_Master. If not, see <http://www.gnu.org/licenses/>. |
|
|
---------------------------------------------------------------------------------- |
-- Company: |
-- Engineer: Andreas Weschenfelder |
-- |
-- Create Date: 07:53:01 04/29/2010 |
-- Design Name: |
-- Module Name: JTAG_Ctrl_Master - Behavioral |
-- Project Name: |
-- Target Devices: |
-- Tool versions: |
-- Description: |
-- |
-- Dependencies: |
-- |
-- Revision: |
-- Revision 0.01 - File Created |
-- Additional Comments: |
-- |
---------------------------------------------------------------------------------- |
library IEEE; |
use IEEE.STD_LOGIC_1164.ALL; |
use IEEE.STD_LOGIC_ARITH.ALL; |
use IEEE.STD_LOGIC_UNSIGNED.ALL; |
use IEEE.NUMERIC_STD.ALL; |
|
---- Uncomment the following library declaration if instantiating |
---- any Xilinx primitives in this code. |
--library UNISIM; |
--use UNISIM.VComponents.all; |
|
entity JTAG_Ctrl_Master is |
Generic ( |
|
Wortbreite : natural := 8 |
); |
Port ( |
CLK : in STD_LOGIC; |
|
-- JTAG Part |
BitCount : in STD_LOGIC_VECTOR (15 downto 0); |
Shift_Strobe : in STD_LOGIC; -- eins aktiv... |
TDO : in STD_LOGIC; |
TCK : out STD_LOGIC; |
TMS : out STD_LOGIC; |
TDI : out STD_LOGIC; |
TRst : out STD_LOGIC; |
Busy : out STD_LOGIC; |
StateStart : in std_logic_vector(3 downto 0); |
StateEnd : in std_logic_vector(3 downto 0); |
StateCurrent : out std_logic_vector(3 downto 0); |
|
-- Ram Part |
A : in STD_LOGIC_VECTOR (Addrbreite-1 downto 0); |
WR : in STD_LOGIC; |
Din : in STD_LOGIC_VECTOR (Wortbreite-1 downto 0); |
Dout : out STD_LOGIC_VECTOR (Wortbreite-1 downto 0) |
); |
end JTAG_Ctrl_Master; |
|
architecture Behavioral of JTAG_Ctrl_Master is |
|
constant TEST_LOGIC_RESET : std_logic_vector(3 downto 0) := x"0"; |
constant RUN_TEST_IDLE : std_logic_vector(3 downto 0) := x"1"; |
constant SELECT_DR : std_logic_vector(3 downto 0) := x"2"; |
constant CAPTURE_DR : std_logic_vector(3 downto 0) := x"3"; |
constant SHIFT_DR : std_logic_vector(3 downto 0) := x"4"; |
constant EXIT1_DR : std_logic_vector(3 downto 0) := x"5"; |
constant PAUSE_DR : std_logic_vector(3 downto 0) := x"6"; |
constant EXIT2_DR : std_logic_vector(3 downto 0) := x"7"; |
constant UPDATE_DR : std_logic_vector(3 downto 0) := x"8"; |
constant SELECT_IR : std_logic_vector(3 downto 0) := x"9"; |
constant CAPTURE_IR : std_logic_vector(3 downto 0) := x"A"; |
constant SHIFT_IR : std_logic_vector(3 downto 0) := x"B"; |
constant EXIT1_IR : std_logic_vector(3 downto 0) := x"C"; |
constant PAUSE_IR : std_logic_vector(3 downto 0) := x"D"; |
constant EXIT2_IR : std_logic_vector(3 downto 0) := x"E"; |
constant UPDATE_IR : std_logic_vector(3 downto 0) := x"F"; |
|
--Signal fuer MainThread |
type TypeStateJTAGMaster is ( State_IDLE, State_TapToStart, State_Shift, State_TapToEnd, State_TapToEnd2 ); |
signal StateJTAGMaster : TypeStateJTAGMaster := State_IDLE; |
|
--Signal fuer TMS |
signal int_TMS_CurrState : std_logic_vector(3 downto 0) := TEST_LOGIC_RESET; |
signal int_TMS_StateIn : std_logic_vector(3 downto 0); |
signal int_TMS_SoftResetCnt : std_logic_vector(3 downto 0) := "0000"; |
type TypeTMSStates is (idle, prepare_for_working, working_normal1, working_normal2, working_normal3 , |
working_softreset1, working_softreset2, working_softreset3 ); |
signal TMSState : TypeTMSStates := idle; |
|
--Signal fuer TDI/TDO |
type TypeShiftStates is (idle, prepare_for_working, shifting1, shifting2, shifting3, shifting4 ); |
signal ShiftState : TypeShiftStates := idle; |
signal int_BitCount : std_logic_vector( 15 downto 0 ); |
|
|
|
component RAM is |
Generic ( |
|
Wortbreite : natural := 8 |
); |
Port ( clk : in STD_LOGIC; |
Write : in STD_LOGIC; |
Awr : in STD_LOGIC_VECTOR (Addrbreite-1 downto 0); |
Ard : in STD_LOGIC_VECTOR (Addrbreite-1 downto 0); |
Din : in STD_LOGIC_VECTOR (Wortbreite-1 downto 0); |
Dout : out STD_LOGIC_VECTOR (Wortbreite-1 downto 0) |
); |
end component; |
|
signal BRAM_adr : std_logic_vector(Addrbreite-1 downto 0); |
signal BRAM_Din : std_logic_vector(Wortbreite-1 downto 0); |
signal BRAM_Dout : std_logic_vector(Wortbreite-1 downto 0); |
signal BRAM_WR : std_logic := '0'; |
|
begin |
|
StateCurrent <= int_TMS_CurrState; |
|
|
JTAG_BRAM : RAM |
Port Map ( |
clk => CLK, |
Write => BRAM_WR, |
Awr => BRAM_adr, |
Ard => BRAM_adr, |
Din => BRAM_Din, |
Dout => BRAM_Dout |
); |
|
|
Process ( CLK ) |
begin |
|
if rising_edge( CLK ) then |
|
TRST <= '1'; |
|
|
------------------------------------------ |
-- BlockRAM Steuerung |
------------------------------------------ |
Dout <= BRAM_Dout; |
if ShiftState = idle then |
BRAM_adr <= A; |
else |
BRAM_adr <= int_BitCount(12 downto 3); |
end if; |
|
------------------------------------------ |
-- Main Thread |
------------------------------------------ |
case StateJTAGMaster is |
|
when State_IDLE => |
|
Busy <= '0'; |
|
if (Shift_Strobe='1') then |
Busy <= '1'; |
int_TMS_StateIn <= StateStart; |
TMSState <= prepare_for_working; |
StateJTAGMaster <= State_TapToStart; |
end if; |
|
BRAM_WR <= WR; |
BRAM_Din <= Din; |
|
when State_TapToStart => |
|
if (TMSState = idle) then |
StateJTAGMaster <= State_Shift; |
ShiftState <= prepare_for_working; |
end if; |
|
when State_Shift => |
|
if ShiftState = idle then |
int_TMS_StateIn <= StateEnd; |
TMSState <= prepare_for_working; |
StateJTAGMaster <= State_TapToEnd; |
end if; |
|
when State_TapToEnd => |
|
if (TMSState = idle) then |
Busy <= '0'; |
StateJTAGMaster <= State_TapToEnd2; |
end if; |
|
when State_TapToEnd2 => |
if (Shift_Strobe='0') then |
StateJTAGMaster <= State_IDLE; |
end if; |
|
when others => |
StateJTAGMaster <= State_IDLE; |
end case; |
|
|
|
|
|
|
--------------------------------------------------------------------------------------- |
-- Control data shifting to/from of device |
--------------------------------------------------------------------------------------- |
|
case ShiftState is |
when idle => |
|
when prepare_for_working => |
|
if BitCount = "0000000000000000" then |
ShiftState <= idle; |
else |
ShiftState <= shifting1; |
int_BitCount <= (others => '0'); |
end if; |
|
when shifting1 => |
-- TMS: Letztes Bit, bei TMS-Statewechsel setzen... |
if BitCount = (int_BitCount+1) then |
if (int_TMS_CurrState /= StateEnd) then |
TMS <= '1'; |
int_TMS_CurrState <= int_TMS_CurrState + 1; |
end if; |
end if; |
-- TDI schieben |
TDI <= BRAM_Dout(CONV_INTEGER( int_BitCount ) mod 8); |
|
ShiftState <= shifting2; |
|
when shifting2 => |
TCK <= '0'; |
ShiftState <= shifting3; |
|
when shifting3 => |
-- TDO schieben |
ShiftState <= shifting4; |
BRAM_Din <= BRAM_Dout; |
BRAM_Din(CONV_INTEGER( int_BitCount ) mod 8) <= TDO; |
BRAM_WR <= '1'; |
|
when shifting4 => |
|
BRAM_WR <= '0'; |
|
TCK <= '1'; |
if BitCount = (int_BitCount+1) then |
ShiftState <= idle; |
else |
ShiftState <= shifting1; |
int_BitCount <= int_BitCount + 1; |
end if; |
|
when others => |
ShiftState <= idle; |
end case; |
|
|
|
|
|
--------------------------------------------------------------------------------------- |
-- Control TAP state of device |
--------------------------------------------------------------------------------------- |
case TMSState is |
|
when idle => |
|
|
when prepare_for_working => |
|
|
|
if (int_TMS_CurrState /= int_TMS_StateIn) then |
TMSState <= working_normal1; |
else |
if ( int_TMS_StateIn = TEST_LOGIC_RESET ) then |
TMSState <= working_softreset1; |
else |
-- already in state -> do nothing |
TMSState <= idle; |
end if; |
end if; |
|
when working_normal1 => |
|
case int_TMS_CurrState is |
|
when TEST_LOGIC_RESET => |
if int_TMS_StateIn = TEST_LOGIC_RESET then |
TMS <= '1'; |
int_TMS_CurrState <= TEST_LOGIC_RESET; |
else |
TMS <= '0'; |
int_TMS_CurrState <= RUN_TEST_IDLE; |
end if; |
|
when RUN_TEST_IDLE => |
if int_TMS_StateIn = RUN_TEST_IDLE then |
TMS <= '0'; |
int_TMS_CurrState <= RUN_TEST_IDLE; |
else |
TMS <= '1'; |
int_TMS_CurrState <= SELECT_DR; |
end if; |
|
when SELECT_DR => |
if ( int_TMS_StateIn = TEST_LOGIC_RESET ) or |
( int_TMS_StateIn = RUN_TEST_IDLE ) or |
( int_TMS_StateIn = SELECT_IR ) or |
( int_TMS_StateIn = CAPTURE_IR ) or |
( int_TMS_StateIn = SHIFT_IR ) or |
( int_TMS_StateIn = EXIT1_IR ) or |
( int_TMS_StateIn = PAUSE_IR ) or |
( int_TMS_StateIn = EXIT2_IR ) or |
( int_TMS_StateIn = UPDATE_IR ) then |
TMS <= '1'; |
int_TMS_CurrState <= SELECT_IR; |
else |
TMS <= '0'; |
int_TMS_CurrState <= CAPTURE_DR; |
end if; |
|
when CAPTURE_DR => |
if int_TMS_StateIn = EXIT1_DR then |
TMS <= '1'; |
int_TMS_CurrState <= EXIT1_DR; |
else |
TMS <= '0'; |
int_TMS_CurrState <= SHIFT_DR; |
end if; |
|
when SHIFT_DR => |
if int_TMS_StateIn = SHIFT_DR then |
TMS <= '0'; |
int_TMS_CurrState <= SHIFT_DR; |
else |
TMS <= '1'; |
int_TMS_CurrState <= EXIT1_DR; |
end if; |
|
when EXIT1_DR => |
if int_TMS_StateIn = UPDATE_DR then |
TMS <= '1'; |
int_TMS_CurrState <= UPDATE_DR; |
else |
TMS <= '0'; |
int_TMS_CurrState <= PAUSE_DR; |
end if; |
|
when PAUSE_DR => |
if int_TMS_StateIn = PAUSE_DR then |
TMS <= '0'; |
int_TMS_CurrState <= PAUSE_DR; |
else |
TMS <= '1'; |
int_TMS_CurrState <= EXIT2_DR; |
end if; |
|
when EXIT2_DR => |
if int_TMS_StateIn = SHIFT_DR then |
TMS <= '0'; |
int_TMS_CurrState <= SHIFT_DR; |
else |
TMS <= '1'; |
int_TMS_CurrState <= UPDATE_DR; |
end if; |
|
when UPDATE_DR => |
if int_TMS_StateIn = RUN_TEST_IDLE then |
TMS <= '0'; |
int_TMS_CurrState <= RUN_TEST_IDLE; |
else |
TMS <= '1'; |
int_TMS_CurrState <= SELECT_DR; |
end if; |
|
when SELECT_IR => |
if int_TMS_StateIn = TEST_LOGIC_RESET then |
TMS <= '1'; |
int_TMS_CurrState <= TEST_LOGIC_RESET; |
else |
TMS <= '0'; |
int_TMS_CurrState <= CAPTURE_IR; |
end if; |
|
when CAPTURE_IR => |
if int_TMS_StateIn = EXIT1_IR then |
TMS <= '1'; |
int_TMS_CurrState <= EXIT1_IR; |
else |
TMS <= '0'; |
int_TMS_CurrState <= SHIFT_IR; |
end if; |
|
when SHIFT_IR => |
if int_TMS_StateIn = SHIFT_IR then |
TMS <= '0'; |
int_TMS_CurrState <= SHIFT_IR; |
else |
TMS <= '1'; |
int_TMS_CurrState <= EXIT1_IR; |
end if; |
|
when EXIT1_IR => |
if int_TMS_StateIn = UPDATE_IR then |
TMS <= '1'; |
int_TMS_CurrState <= UPDATE_IR; |
else |
TMS <= '0'; |
int_TMS_CurrState <= PAUSE_IR; |
end if; |
|
when PAUSE_IR => |
if int_TMS_StateIn = PAUSE_IR then |
TMS <= '0'; |
int_TMS_CurrState <= PAUSE_IR; |
else |
TMS <= '1'; |
int_TMS_CurrState <= EXIT2_IR; |
end if; |
|
when EXIT2_IR => |
if int_TMS_StateIn = SHIFT_IR then |
TMS <= '0'; |
int_TMS_CurrState <= SHIFT_IR; |
else |
TMS <= '1'; |
int_TMS_CurrState <= UPDATE_IR; |
end if; |
|
when UPDATE_IR => |
if int_TMS_StateIn = RUN_TEST_IDLE then |
TMS <= '0'; |
int_TMS_CurrState <= RUN_TEST_IDLE; |
else |
TMS <= '1'; |
int_TMS_CurrState <= SELECT_DR; |
end if; |
|
when others => |
int_TMS_CurrState <= TEST_LOGIC_RESET; |
|
end case; |
|
TMSState <= working_normal2; |
|
when working_normal2 => |
TCK <= '0'; |
TMSState <= working_normal3; |
|
when working_normal3 => |
|
TCK <= '1'; |
|
if (int_TMS_CurrState = int_TMS_StateIn) then |
TMSState <= idle; |
else |
TMSState <= working_normal1; |
end if; |
|
|
when working_softreset1 => |
TMS <= '1'; |
int_TMS_SoftResetCnt <= "0101"; |
TMSState <= working_softreset2; |
|
when working_softreset2 => |
TCK <= '0'; |
TMSState <= working_softreset3; |
|
when working_softreset3 => |
|
TCK <= '1'; |
int_TMS_SoftResetCnt <= int_TMS_SoftResetCnt - 1; |
|
if (int_TMS_SoftResetCnt > "0000") then |
TMSState <= working_softreset2; |
else |
int_TMS_CurrState <= TEST_LOGIC_RESET; |
TMSState <= idle; |
end if; |
|
when others => |
TMSState <= idle; |
|
end case; |
|
|
|
end if; |
|
|
|
End Process; |
|
|
end Behavioral; |
|
/trunk/jtag_master/hooks/pre-revprop-change.tmpl
0,0 → 1,66
#!/bin/sh |
|
# PRE-REVPROP-CHANGE HOOK |
# |
# The pre-revprop-change hook is invoked before a revision property |
# is added, modified or deleted. Subversion runs this hook by invoking |
# a program (script, executable, binary, etc.) named 'pre-revprop-change' |
# (for which this file is a template), with the following ordered |
# arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] REVISION (the revision being tweaked) |
# [3] USER (the username of the person tweaking the property) |
# [4] PROPNAME (the property being set on the revision) |
# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted) |
# |
# [STDIN] PROPVAL ** the new property value is passed via STDIN. |
# |
# If the hook program exits with success, the propchange happens; but |
# if it exits with failure (non-zero), the propchange doesn't happen. |
# The hook program can use the 'svnlook' utility to examine the |
# existing value of the revision property. |
# |
# WARNING: unlike other hooks, this hook MUST exist for revision |
# properties to be changed. If the hook does not exist, Subversion |
# will behave as if the hook were present, but failed. The reason |
# for this is that revision properties are UNVERSIONED, meaning that |
# a successful propchange is destructive; the old value is gone |
# forever. We recommend the hook back up the old value somewhere. |
# |
# On a Unix system, the normal procedure is to have 'pre-revprop-change' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'pre-revprop-change' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'pre-revprop-change.bat' or 'pre-revprop-change.exe', |
# but the basic idea is the same. |
# |
# The hook program typically does not inherit the environment of |
# its parent process. For example, a common problem is for the |
# PATH environment variable to not be set to its usual value, so |
# that subprograms fail to launch unless invoked via absolute path. |
# If you're having unexpected problems with a hook program, the |
# culprit may be unusual (or missing) environment variables. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter. |
# For more examples and pre-written hooks, see those in |
# the Subversion repository at |
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and |
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/ |
|
|
REPOS="$1" |
REV="$2" |
USER="$3" |
PROPNAME="$4" |
ACTION="$5" |
|
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi |
|
echo "Changing revision properties other than svn:log is prohibited" >&2 |
exit 1 |
/trunk/jtag_master/hooks/post-commit.tmpl
0,0 → 1,50
#!/bin/sh |
|
# POST-COMMIT HOOK |
# |
# The post-commit hook is invoked after a commit. Subversion runs |
# this hook by invoking a program (script, executable, binary, etc.) |
# named 'post-commit' (for which this file is a template) with the |
# following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] REV (the number of the revision just committed) |
# |
# The default working directory for the invocation is undefined, so |
# the program should set one explicitly if it cares. |
# |
# Because the commit has already completed and cannot be undone, |
# the exit code of the hook program is ignored. The hook program |
# can use the 'svnlook' utility to help it examine the |
# newly-committed tree. |
# |
# On a Unix system, the normal procedure is to have 'post-commit' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'post-commit' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'post-commit.bat' or 'post-commit.exe', |
# but the basic idea is the same. |
# |
# The hook program typically does not inherit the environment of |
# its parent process. For example, a common problem is for the |
# PATH environment variable to not be set to its usual value, so |
# that subprograms fail to launch unless invoked via absolute path. |
# If you're having unexpected problems with a hook program, the |
# culprit may be unusual (or missing) environment variables. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter. |
# For more examples and pre-written hooks, see those in |
# the Subversion repository at |
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and |
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/ |
|
|
REPOS="$1" |
REV="$2" |
|
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf |
/trunk/jtag_master/hooks/post-lock.tmpl
0,0 → 1,44
#!/bin/sh |
|
# POST-LOCK HOOK |
# |
# The post-lock hook is run after a path is locked. Subversion runs |
# this hook by invoking a program (script, executable, binary, etc.) |
# named 'post-lock' (for which this file is a template) with the |
# following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] USER (the user who created the lock) |
# |
# The paths that were just locked are passed to the hook via STDIN (as |
# of Subversion 1.2, only one path is passed per invocation, but the |
# plan is to pass all locked paths at once, so the hook program |
# should be written accordingly). |
# |
# The default working directory for the invocation is undefined, so |
# the program should set one explicitly if it cares. |
# |
# Because the lock has already been created and cannot be undone, |
# the exit code of the hook program is ignored. The hook program |
# can use the 'svnlook' utility to help it examine the |
# newly-created lock. |
# |
# On a Unix system, the normal procedure is to have 'post-lock' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'post-lock' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'post-lock.bat' or 'post-lock.exe', |
# but the basic idea is the same. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
REPOS="$1" |
USER="$2" |
|
# Send email to interested parties, let them know a lock was created: |
mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf |
/trunk/jtag_master/hooks/pre-commit.tmpl
0,0 → 1,81
#!/bin/sh |
|
# PRE-COMMIT HOOK |
# |
# The pre-commit hook is invoked before a Subversion txn is |
# committed. Subversion runs this hook by invoking a program |
# (script, executable, binary, etc.) named 'pre-commit' (for which |
# this file is a template), with the following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] TXN-NAME (the name of the txn about to be committed) |
# |
# [STDIN] LOCK-TOKENS ** the lock tokens are passed via STDIN. |
# |
# If STDIN contains the line "LOCK-TOKENS:\n" (the "\n" denotes a |
# single newline), the lines following it are the lock tokens for |
# this commit. The end of the list is marked by a line containing |
# only a newline character. |
# |
# Each lock token line consists of a URI-escaped path, followed |
# by the separator character '|', followed by the lock token string, |
# followed by a newline. |
# |
# The default working directory for the invocation is undefined, so |
# the program should set one explicitly if it cares. |
# |
# If the hook program exits with success, the txn is committed; but |
# if it exits with failure (non-zero), the txn is aborted, no commit |
# takes place, and STDERR is returned to the client. The hook |
# program can use the 'svnlook' utility to help it examine the txn. |
# |
# On a Unix system, the normal procedure is to have 'pre-commit' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT *** |
# *** FOR REVISION PROPERTIES (like svn:log or svn:author). *** |
# |
# This is why we recommend using the read-only 'svnlook' utility. |
# In the future, Subversion may enforce the rule that pre-commit |
# hooks should not modify the versioned data in txns, or else come |
# up with a mechanism to make it safe to do so (by informing the |
# committing client of the changes). However, right now neither |
# mechanism is implemented, so hook writers just have to be careful. |
# |
# Note that 'pre-commit' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'pre-commit.bat' or 'pre-commit.exe', |
# but the basic idea is the same. |
# |
# The hook program typically does not inherit the environment of |
# its parent process. For example, a common problem is for the |
# PATH environment variable to not be set to its usual value, so |
# that subprograms fail to launch unless invoked via absolute path. |
# If you're having unexpected problems with a hook program, the |
# culprit may be unusual (or missing) environment variables. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter. |
# For more examples and pre-written hooks, see those in |
# the Subversion repository at |
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and |
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/ |
|
|
REPOS="$1" |
TXN="$2" |
|
# Make sure that the log message contains some text. |
SVNLOOK=/usr/local/bin/svnlook |
$SVNLOOK log -t "$TXN" "$REPOS" | \ |
grep "[a-zA-Z0-9]" > /dev/null || exit 1 |
|
# Check that the author of this commit has the rights to perform |
# the commit on the files and directories being modified. |
commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1 |
|
# All checks passed, so allow the commit. |
exit 0 |
/trunk/jtag_master/hooks/pre-lock.tmpl
0,0 → 1,71
#!/bin/sh |
|
# PRE-LOCK HOOK |
# |
# The pre-lock hook is invoked before an exclusive lock is |
# created. Subversion runs this hook by invoking a program |
# (script, executable, binary, etc.) named 'pre-lock' (for which |
# this file is a template), with the following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] PATH (the path in the repository about to be locked) |
# [3] USER (the user creating the lock) |
# [4] COMMENT (the comment of the lock) |
# [5] STEAL-LOCK (1 if the user is trying to steal the lock, else 0) |
# |
# If the hook program outputs anything on stdout, the output string will |
# be used as the lock token for this lock operation. If you choose to use |
# this feature, you must guarantee the tokens generated are unique across |
# the repository each time. |
# |
# The default working directory for the invocation is undefined, so |
# the program should set one explicitly if it cares. |
# |
# If the hook program exits with success, the lock is created; but |
# if it exits with failure (non-zero), the lock action is aborted |
# and STDERR is returned to the client. |
|
# On a Unix system, the normal procedure is to have 'pre-lock' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'pre-lock' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'pre-lock.bat' or 'pre-lock.exe', |
# but the basic idea is the same. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
REPOS="$1" |
PATH="$2" |
USER="$3" |
|
# If a lock exists and is owned by a different person, don't allow it |
# to be stolen (e.g., with 'svn lock --force ...'). |
|
# (Maybe this script could send email to the lock owner?) |
SVNLOOK=/usr/local/bin/svnlook |
GREP=/bin/grep |
SED=/bin/sed |
|
LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ |
$GREP '^Owner: ' | $SED 's/Owner: //'` |
|
# If we get no result from svnlook, there's no lock, allow the lock to |
# happen: |
if [ "$LOCK_OWNER" = "" ]; then |
exit 0 |
fi |
|
# If the person locking matches the lock's owner, allow the lock to |
# happen: |
if [ "$LOCK_OWNER" = "$USER" ]; then |
exit 0 |
fi |
|
# Otherwise, we've got an owner mismatch, so return failure: |
echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2 |
exit 1 |
/trunk/jtag_master/hooks/post-unlock.tmpl
0,0 → 1,42
#!/bin/sh |
|
# POST-UNLOCK HOOK |
# |
# The post-unlock hook runs after a path is unlocked. Subversion runs |
# this hook by invoking a program (script, executable, binary, etc.) |
# named 'post-unlock' (for which this file is a template) with the |
# following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] USER (the user who destroyed the lock) |
# |
# The paths that were just unlocked are passed to the hook via STDIN |
# (as of Subversion 1.2, only one path is passed per invocation, but |
# the plan is to pass all unlocked paths at once, so the hook program |
# should be written accordingly). |
# |
# The default working directory for the invocation is undefined, so |
# the program should set one explicitly if it cares. |
# |
# Because the lock has already been destroyed and cannot be undone, |
# the exit code of the hook program is ignored. |
# |
# On a Unix system, the normal procedure is to have 'post-unlock' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'post-unlock' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'post-unlock.bat' or 'post-unlock.exe', |
# but the basic idea is the same. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
REPOS="$1" |
USER="$2" |
|
# Send email to interested parties, let them know a lock was removed: |
mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf |
/trunk/jtag_master/hooks/pre-unlock.tmpl
0,0 → 1,63
#!/bin/sh |
|
# PRE-UNLOCK HOOK |
# |
# The pre-unlock hook is invoked before an exclusive lock is |
# destroyed. Subversion runs this hook by invoking a program |
# (script, executable, binary, etc.) named 'pre-unlock' (for which |
# this file is a template), with the following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] PATH (the path in the repository about to be unlocked) |
# [3] USER (the user destroying the lock) |
# [4] TOKEN (the lock token to be destroyed) |
# [5] BREAK-UNLOCK (1 if the user is breaking the lock, else 0) |
# |
# The default working directory for the invocation is undefined, so |
# the program should set one explicitly if it cares. |
# |
# If the hook program exits with success, the lock is destroyed; but |
# if it exits with failure (non-zero), the unlock action is aborted |
# and STDERR is returned to the client. |
|
# On a Unix system, the normal procedure is to have 'pre-unlock' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'pre-unlock' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'pre-unlock.bat' or 'pre-unlock.exe', |
# but the basic idea is the same. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
REPOS="$1" |
PATH="$2" |
USER="$3" |
|
# If a lock is owned by a different person, don't allow it be broken. |
# (Maybe this script could send email to the lock owner?) |
|
SVNLOOK=/usr/local/bin/svnlook |
GREP=/bin/grep |
SED=/bin/sed |
|
LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ |
$GREP '^Owner: ' | $SED 's/Owner: //'` |
|
# If we get no result from svnlook, there's no lock, return success: |
if [ "$LOCK_OWNER" = "" ]; then |
exit 0 |
fi |
|
# If the person unlocking matches the lock's owner, return success: |
if [ "$LOCK_OWNER" = "$USER" ]; then |
exit 0 |
fi |
|
# Otherwise, we've got an owner mismatch, so return failure: |
echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2 |
exit 1 |
/trunk/jtag_master/hooks/post-revprop-change.tmpl
0,0 → 1,56
#!/bin/sh |
|
# POST-REVPROP-CHANGE HOOK |
# |
# The post-revprop-change hook is invoked after a revision property |
# has been added, modified or deleted. Subversion runs this hook by |
# invoking a program (script, executable, binary, etc.) named |
# 'post-revprop-change' (for which this file is a template), with the |
# following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] REV (the revision that was tweaked) |
# [3] USER (the username of the person tweaking the property) |
# [4] PROPNAME (the property that was changed) |
# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted) |
# |
# [STDIN] PROPVAL ** the old property value is passed via STDIN. |
# |
# Because the propchange has already completed and cannot be undone, |
# the exit code of the hook program is ignored. The hook program |
# can use the 'svnlook' utility to help it examine the |
# new property value. |
# |
# On a Unix system, the normal procedure is to have 'post-revprop-change' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'post-revprop-change' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'post-revprop-change.bat' or 'post-revprop-change.exe', |
# but the basic idea is the same. |
# |
# The hook program typically does not inherit the environment of |
# its parent process. For example, a common problem is for the |
# PATH environment variable to not be set to its usual value, so |
# that subprograms fail to launch unless invoked via absolute path. |
# If you're having unexpected problems with a hook program, the |
# culprit may be unusual (or missing) environment variables. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter. |
# For more examples and pre-written hooks, see those in |
# the Subversion repository at |
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and |
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/ |
|
|
REPOS="$1" |
REV="$2" |
USER="$3" |
PROPNAME="$4" |
ACTION="$5" |
|
mailer.py propchange2 "$REPOS" "$REV" "$USER" "$PROPNAME" "$ACTION" /path/to/mailer.conf |
/trunk/jtag_master/hooks/start-commit.tmpl
0,0 → 1,65
#!/bin/sh |
|
# START-COMMIT HOOK |
# |
# The start-commit hook is invoked before a Subversion txn is created |
# in the process of doing a commit. Subversion runs this hook |
# by invoking a program (script, executable, binary, etc.) named |
# 'start-commit' (for which this file is a template) |
# with the following ordered arguments: |
# |
# [1] REPOS-PATH (the path to this repository) |
# [2] USER (the authenticated user attempting to commit) |
# [3] CAPABILITIES (a colon-separated list of capabilities reported |
# by the client; see note below) |
# |
# Note: The CAPABILITIES parameter is new in Subversion 1.5, and 1.5 |
# clients will typically report at least the "mergeinfo" capability. |
# If there are other capabilities, then the list is colon-separated, |
# e.g.: "mergeinfo:some-other-capability" (the order is undefined). |
# |
# The list is self-reported by the client. Therefore, you should not |
# make security assumptions based on the capabilities list, nor should |
# you assume that clients reliably report every capability they have. |
# |
# The working directory for this hook program's invocation is undefined, |
# so the program should set one explicitly if it cares. |
# |
# If the hook program exits with success, the commit continues; but |
# if it exits with failure (non-zero), the commit is stopped before |
# a Subversion txn is created, and STDERR is returned to the client. |
# |
# On a Unix system, the normal procedure is to have 'start-commit' |
# invoke other programs to do the real work, though it may do the |
# work itself too. |
# |
# Note that 'start-commit' must be executable by the user(s) who will |
# invoke it (typically the user httpd runs as), and that user must |
# have filesystem-level permission to access the repository. |
# |
# On a Windows system, you should name the hook program |
# 'start-commit.bat' or 'start-commit.exe', |
# but the basic idea is the same. |
# |
# The hook program typically does not inherit the environment of |
# its parent process. For example, a common problem is for the |
# PATH environment variable to not be set to its usual value, so |
# that subprograms fail to launch unless invoked via absolute path. |
# If you're having unexpected problems with a hook program, the |
# culprit may be unusual (or missing) environment variables. |
# |
# Here is an example hook script, for a Unix /bin/sh interpreter. |
# For more examples and pre-written hooks, see those in |
# the Subversion repository at |
# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and |
# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/ |
|
|
REPOS="$1" |
USER="$2" |
|
commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1 |
special-auth-check.py --user "$USER" --auth-level 3 || exit 1 |
|
# All checks passed, so allow the commit. |
exit 0 |
/trunk/jtag_master/conf/svnserve.conf
0,0 → 1,47
### This file controls the configuration of the svnserve daemon, if you |
### use it to allow access to this repository. (If you only allow |
### access through http: and/or file: URLs, then this file is |
### irrelevant.) |
|
### Visit http://subversion.tigris.org/ for more information. |
|
[general] |
### These options control access to the repository for unauthenticated |
### and authenticated users. Valid values are "write", "read", |
### and "none". The sample settings below are the defaults. |
# anon-access = read |
# auth-access = write |
### The password-db option controls the location of the password |
### database file. Unless you specify a path starting with a /, |
### the file's location is relative to the directory containing |
### this configuration file. |
### If SASL is enabled (see below), this file will NOT be used. |
### Uncomment the line below to use the default password file. |
# password-db = passwd |
### The authz-db option controls the location of the authorization |
### rules for path-based access control. Unless you specify a path |
### starting with a /, the file's location is relative to the the |
### directory containing this file. If you don't specify an |
### authz-db, no path-based access control is done. |
### Uncomment the line below to use the default authorization file. |
# authz-db = authz |
### This option specifies the authentication realm of the repository. |
### If two repositories have the same authentication realm, they should |
### have the same password database, and vice versa. The default realm |
### is repository's uuid. |
# realm = My First Repository |
|
[sasl] |
### This option specifies whether you want to use the Cyrus SASL |
### library for authentication. Default is false. |
### This section will be ignored if svnserve is not built with Cyrus |
### SASL support; to check, run 'svnserve --version' and look for a line |
### reading 'Cyrus SASL authentication is available.' |
# use-sasl = true |
### These options specify the desired strength of the security layer |
### that you want SASL to provide. 0 means no encryption, 1 means |
### integrity-checking only, values larger than 1 are correlated |
### to the effective key length for encryption (e.g. 128 means 128-bit |
### encryption). The values below are the defaults. |
# min-encryption = 0 |
# max-encryption = 256 |
/trunk/jtag_master/conf/passwd
0,0 → 1,8
### This file is an example password file for svnserve. |
### Its format is similar to that of svnserve.conf. As shown in the |
### example below it contains one section labelled [users]. |
### The name and password for each user follow, one account per line. |
|
[users] |
# harry = harryssecret |
# sally = sallyssecret |
/trunk/jtag_master/conf/authz
0,0 → 1,32
### This file is an example authorization file for svnserve. |
### Its format is identical to that of mod_authz_svn authorization |
### files. |
### As shown below each section defines authorizations for the path and |
### (optional) repository specified by the section name. |
### The authorizations follow. An authorization line can refer to: |
### - a single user, |
### - a group of users defined in a special [groups] section, |
### - an alias defined in a special [aliases] section, |
### - all authenticated users, using the '$authenticated' token, |
### - only anonymous users, using the '$anonymous' token, |
### - anyone, using the '*' wildcard. |
### |
### A match can be inverted by prefixing the rule with '~'. Rules can |
### grant read ('r') access, read-write ('rw') access, or no access |
### (''). |
|
[aliases] |
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average |
|
[groups] |
# harry_and_sally = harry,sally |
# harry_sally_and_joe = harry,sally,&joe |
|
# [/foo/bar] |
# harry = rw |
# &joe = r |
# * = |
|
# [repository:/baz/fuz] |
# @harry_and_sally = rw |
# * = r |
/trunk/jtag_master/db/revs/0/0
0,0 → 1,11
PLAIN |
END |
ENDREP |
id: 0.0.r0/17 |
type: dir |
count: 0 |
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e |
cpath: / |
|
|
17 107 |
/trunk/jtag_master/db/txn-current-lock
--- trunk/jtag_master/db/revprops/0/0 (nonexistent)
+++ trunk/jtag_master/db/revprops/0/0 (revision 3)
@@ -0,0 +1,5 @@
+K 8
+svn:date
+V 27
+2010-06-08T17:45:31.531250Z
+END
/trunk/jtag_master/db/write-lock
--- trunk/jtag_master/db/current (nonexistent)
+++ trunk/jtag_master/db/current (revision 3)
@@ -0,0 +1 @@
+0
/trunk/jtag_master/db/fsfs.conf
0,0 → 1,37
### This file controls the configuration of the FSFS filesystem. |
|
[memcached-servers] |
### These options name memcached servers used to cache internal FSFS |
### data. See http://www.danga.com/memcached/ for more information on |
### memcached. To use memcached with FSFS, run one or more memcached |
### servers, and specify each of them as an option like so: |
# first-server = 127.0.0.1:11211 |
# remote-memcached = mymemcached.corp.example.com:11212 |
### The option name is ignored; the value is of the form HOST:PORT. |
### memcached servers can be shared between multiple repositories; |
### however, if you do this, you *must* ensure that repositories have |
### distinct UUIDs and paths, or else cached data from one repository |
### might be used by another accidentally. Note also that memcached has |
### no authentication for reads or writes, so you must ensure that your |
### memcached servers are only accessible by trusted users. |
|
[caches] |
### When a cache-related error occurs, normally Subversion ignores it |
### and continues, logging an error if the server is appropriately |
### configured (and ignoring it with file:// access). To make |
### Subversion never ignore cache errors, uncomment this line. |
# fail-stop = true |
|
[rep-sharing] |
### To conserve space, the filesystem can optionally avoid storing |
### duplicate representations. This comes at a slight cost in performace, |
### as maintaining a database of shared representations can increase |
### commit times. The space savings are dependent upon the size of the |
### repository, the number of objects it contains and the amount of |
### duplication between them, usually a function of the branching and |
### merging process. |
### |
### The following parameter enables rep-sharing in the repository. It can |
### be switched on and off at will, but for best space-saving results |
### should be enabled consistently over the life of the repository. |
# enable-rep-sharing = false |
/trunk/jtag_master/db/min-unpacked-rev
0,0 → 1,37
|
/trunk/jtag_master/db/uuid
0,0 → 1,37
ba790a69-46f6-3149-ba96-08500f1ef5fc |
/trunk/jtag_master/db/fs-type
0,0 → 1,37
fsfs |
/trunk/jtag_master/db/format
0,0 → 1,2
4 |
layout sharded 1000 |
/trunk/jtag_master/db/txn-current
0,0 → 1,2
|
/trunk/jtag_master/db/rep-cache.db
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
trunk/jtag_master/db/rep-cache.db
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/jtag_master/format
===================================================================
--- trunk/jtag_master/format (nonexistent)
+++ trunk/jtag_master/format (revision 3)
@@ -0,0 +1 @@
+5
Index: trunk/jtag_master/locks/db.lock
===================================================================
--- trunk/jtag_master/locks/db.lock (nonexistent)
+++ trunk/jtag_master/locks/db.lock (revision 3)
@@ -0,0 +1,3 @@
+This file is not used by Subversion 1.3.x or later.
+However, its existence is required for compatibility with
+Subversion 1.2.x or earlier.
Index: trunk/jtag_master/locks/db-logs.lock
===================================================================
--- trunk/jtag_master/locks/db-logs.lock (nonexistent)
+++ trunk/jtag_master/locks/db-logs.lock (revision 3)
@@ -0,0 +1,3 @@
+This file is not used by Subversion 1.3.x or later.
+However, its existence is required for compatibility with
+Subversion 1.2.x or earlier.
Index: trunk/jtag_master/README.txt
===================================================================
--- trunk/jtag_master/README.txt (nonexistent)
+++ trunk/jtag_master/README.txt (revision 3)
@@ -0,0 +1,5 @@
+This is a Subversion repository; use the 'svnadmin' tool to examine
+it. Do not add, delete, or modify files here unless you know how
+to avoid corrupting the repository.
+
+Visit http://subversion.tigris.org/ for more information.