mirror of
https://github.com/hneemann/Digital.git
synced 2025-08-03 17:58:28 -04:00
adds a new barrel shifter example
This commit is contained in:
parent
eb71b37077
commit
0ff4e7a7b8
530
src/main/dig/generic/barrelShifter/TestBarrelShifter2.dig
Normal file
530
src/main/dig/generic/barrelShifter/TestBarrelShifter2.dig
Normal file
@ -0,0 +1,530 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes/>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^32</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>32</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^32_in</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>32</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="1" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>sh^32</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>5</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="180"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>barrelShifter2.dig</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>32 bit, left</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>dataBits := 32;
|
||||
direction := "left";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="420" y="140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^8</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>8</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="420"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^8_in</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>8</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="1" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>sh^8</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="440"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>barrelShifter2.dig</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>8 bit, left</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>dataBits := 8;
|
||||
direction := "left";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="420" y="400"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>32 bit, left</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>D^32_in sh^32 D^32
|
||||
loop(n,32)
|
||||
1 (n) (1<<n)
|
||||
end loop
|
||||
|
||||
loop(n,32)
|
||||
7 (n) (7<<n)
|
||||
end loop</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="220"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>8 bit, left</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>D^8_in sh^8 D^8
|
||||
loop(n,8)
|
||||
1 (n) (1<<n)
|
||||
end loop
|
||||
|
||||
loop(n,8)
|
||||
7 (n) (7<<n)
|
||||
end loop</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="480"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^8_R</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>8</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="680"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^8_inR</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>8</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="128" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="660"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>sh^8_R</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>3</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="700"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>barrelShifter2.dig</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>8 bit, right</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>dataBits := 8;
|
||||
direction := "right";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="420" y="660"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>8 bit, right</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>D^8_inR sh^8_R D^8_R
|
||||
loop(n,8)
|
||||
128 (n) (128>>n)
|
||||
end loop
|
||||
|
||||
loop(n,8)
|
||||
192 (n) (192>>n)
|
||||
end loop</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="740"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="960"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^16_in</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>16</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="32768" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="940"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>sh^16</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>4</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="980"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>barrelShifter2.dig</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>16 bit, right, arith</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>dataBits := 16;
|
||||
direction := "arith";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="420" y="940"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>16 bit, right arith</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>D^16_in sh^16 D^16
|
||||
loop(n,16)
|
||||
(1<<14) (n) ((1<<14)>>n)
|
||||
end loop
|
||||
|
||||
loop(n,16)
|
||||
(1<<15) (n) (-1<<(15-n))
|
||||
end loop</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="1020"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Out</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^64</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>64</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="740" y="-120"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D^64_in</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>64</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>intFormat</string>
|
||||
<intFormat>bin</intFormat>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>InDefault</string>
|
||||
<value v="1" z="false"/>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="160" y="-140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>sh^64</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>6</int>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="380" y="-100"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>barrelShifter2.dig</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>64 bit, left</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>dataBits := 64;
|
||||
direction := "left";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="420" y="-140"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Testcase</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>64 bit, left</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Testdata</string>
|
||||
<testData>
|
||||
<dataString>D^64_in sh^64 D^64
|
||||
loop(n,64)
|
||||
1 (n) (1<<n)
|
||||
end loop
|
||||
|
||||
loop(n,64)
|
||||
7 (n) (7<<n)
|
||||
end loop</dataString>
|
||||
</testData>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="580" y="-60"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="480" y="960"/>
|
||||
<p2 x="740" y="960"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="160"/>
|
||||
<p2 x="740" y="160"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="-100"/>
|
||||
<p2 x="420" y="-100"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="420"/>
|
||||
<p2 x="740" y="420"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="680"/>
|
||||
<p2 x="740" y="680"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="-140"/>
|
||||
<p2 x="420" y="-140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="140"/>
|
||||
<p2 x="420" y="140"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="940"/>
|
||||
<p2 x="420" y="940"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="400"/>
|
||||
<p2 x="420" y="400"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="180"/>
|
||||
<p2 x="420" y="180"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="160" y="660"/>
|
||||
<p2 x="420" y="660"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="980"/>
|
||||
<p2 x="420" y="980"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="480" y="-120"/>
|
||||
<p2 x="740" y="-120"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="440"/>
|
||||
<p2 x="420" y="440"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="380" y="700"/>
|
||||
<p2 x="420" y="700"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<measurementOrdering/>
|
||||
</circuit>
|
@ -214,6 +214,17 @@ direction := "arith";</string>
|
||||
</elementAttributes>
|
||||
<pos x="540" y="0"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Text</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>A BarrelShifter implemented using recursion.
|
||||
{{de Ein rekursiv implementierter BarrelShifter.}}</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="180" y="-100"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
|
139
src/main/dig/generic/barrelShifter/barrelShifter2.dig
Normal file
139
src/main/dig/generic/barrelShifter/barrelShifter2.dig
Normal file
@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<circuit>
|
||||
<version>1</version>
|
||||
<attributes>
|
||||
<entry>
|
||||
<string>isGeneric</string>
|
||||
<boolean>true</boolean>
|
||||
</entry>
|
||||
</attributes>
|
||||
<visualElements>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>D</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Bits</string>
|
||||
<int>2</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>this.Bits=args.dataBits;</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-60" y="0"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>GenericInitCode</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>dataBits:=16;
|
||||
direction:="left";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-120" y="-160"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>GenericCode</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>sh:=bitsNeededFor(args.dataBits)-1;
|
||||
|
||||
circuit:="";
|
||||
if (args.direction="right") {
|
||||
circuit="shift-fixed-right-inc.dig";
|
||||
} else {
|
||||
if (args.direction="arith") {
|
||||
circuit="shift-fixed-arith-right-inc.dig";
|
||||
} else {
|
||||
if (args.direction="left") {
|
||||
circuit="shift-fixed-left-inc.dig";
|
||||
} else {
|
||||
panic("only \"left\", \"right\" or \"arith\" is allowed as direction, not \""+args.direction+"\"!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i:=0;i<sh;i++) {
|
||||
x:= i*5+2;
|
||||
s:=addComponent(circuit,x,0);
|
||||
s.shift:=1<<i;
|
||||
|
||||
addWire(x+3,1,x+5,0);
|
||||
|
||||
addWire(0,i+5,x-1,i+5);
|
||||
addWire(x-1,i+5,x-1,2);
|
||||
addWire(x-1,2,x,2);
|
||||
}
|
||||
|
||||
o:=addComponent("Out",sh*5+2,0);
|
||||
o.Bits=args.dataBits;
|
||||
o.Label="Out";</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-780" y="-40"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>In</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Label</string>
|
||||
<string>sh</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>this.Bits=bitsNeededFor(args.dataBits)-1;</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-60" y="100"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Splitter</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Input Splitting</string>
|
||||
<string>2</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>generic</string>
|
||||
<string>sh:=bitsNeededFor(args.dataBits)-1;
|
||||
this.'Input Splitting'=""+sh;
|
||||
this.'Output Splitting'="1*"+sh;</string>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Output Splitting</string>
|
||||
<string>1,1</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-20" y="100"/>
|
||||
</visualElement>
|
||||
<visualElement>
|
||||
<elementName>Text</elementName>
|
||||
<elementAttributes>
|
||||
<entry>
|
||||
<string>Description</string>
|
||||
<string>A BarrelShifter implemented using component creation.
|
||||
{{de Ein BarrelShifter implementiert durch Bauteilerzeugung.}}</string>
|
||||
</entry>
|
||||
</elementAttributes>
|
||||
<pos x="-780" y="-280"/>
|
||||
</visualElement>
|
||||
</visualElements>
|
||||
<wires>
|
||||
<wire>
|
||||
<p1 x="-60" y="0"/>
|
||||
<p2 x="40" y="0"/>
|
||||
</wire>
|
||||
<wire>
|
||||
<p1 x="-60" y="100"/>
|
||||
<p2 x="-20" y="100"/>
|
||||
</wire>
|
||||
</wires>
|
||||
<measurementOrdering/>
|
||||
</circuit>
|
@ -40,8 +40,8 @@ public class TestExamples extends TestCase {
|
||||
*/
|
||||
public void testDistExamples() throws Exception {
|
||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||
assertEquals(309, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(495, testCasesInFiles);
|
||||
assertEquals(311, new FileScanner(this::check).scan(examples));
|
||||
assertEquals(500, testCasesInFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user